Browse Source

HPCC-8114 Make missing return an error

Fix some false positives from a stupid compiler.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 năm trước cách đây
mục cha
commit
7f2bfb8b45

+ 1 - 0
dali/datest/datest.cpp

@@ -1209,6 +1209,7 @@ public:
                 id2 = conn->subscribe(*new CCSub(s.str()));
                 id2 = conn->subscribe(*new CCSub(s.str()));
             }
             }
         }
         }
+        throwUnexpected(); // loop never terminates, but some compilers complain about missing return without this line
     }
     }
 
 
     SubscriptionId id1, id2;
     SubscriptionId id1, id2;

+ 1 - 0
ecl/hqlcpp/hqlhtcpp.cpp

@@ -2970,6 +2970,7 @@ static bool anyXmlGeneratedForPass(IHqlExpression * expr, unsigned pass)
     default:
     default:
         UNIMPLEMENTED;
         UNIMPLEMENTED;
     }
     }
+    throwUnexpected(); // unreachable, but some compilers will complain about missing return
 }
 }
 
 
 
 

+ 1 - 0
roxie/ccd/ccdquery.cpp

@@ -566,6 +566,7 @@ protected:
             throw MakeStringException(ROXIE_UNIMPLEMENTED_ERROR, "Unimplemented activity %s required", getActivityText(kind));
             throw MakeStringException(ROXIE_UNIMPLEMENTED_ERROR, "Unimplemented activity %s required", getActivityText(kind));
             break;
             break;
         }
         }
+        throwUnexpected(); // unreachable, but some compilers will complain about missing return
     }
     }
 
 
     IActivityFactory *findActivity(unsigned id) const
     IActivityFactory *findActivity(unsigned id) const

+ 1 - 0
roxie/udplib/uttest.cpp

@@ -134,6 +134,7 @@ public:
                 lastReport = now;
                 lastReport = now;
             }
             }
         }
         }
+        throwUnexpected(); // loop never terminates, but some compilers complain about missing return without this line
     }
     }
 };
 };