Brace nested ifs to quiet Clang warnings about dangling else clauses
authorPhil Miller <mille121@illinois.edu>
Fri, 27 Jul 2012 17:22:32 +0000 (12:22 -0500)
committerPhil Miller <mille121@illinois.edu>
Fri, 27 Jul 2012 17:22:32 +0000 (12:22 -0500)
src/ck-ldb/CentralLB.h
src/ck-ldb/LBAgent.C

index 0d3fb6dfd7e0b2dd7cfee8fbb4bf79b1cf6d1de8..21996ed0930d5b4f49820e73e40da8ea80595849 100644 (file)
@@ -174,8 +174,9 @@ public:
     predictorOn(pred, _lb_predict_window);
   }
   void predictorOn(LBPredictorFunction *pred, int window_size) {
-    if (predicted_model) PredictorPrintf("Predictor already allocated");
-    else {
+    if (predicted_model) {
+      PredictorPrintf("Predictor already allocated");
+    } else {
       _lb_predict_window = window_size;
       if (pred) predicted_model = new FutureModel(window_size, pred);
       else predicted_model = new FutureModel(window_size);
index 7055c51a994b5d5f5712f8f2b433890e2478dfe5..a93f586a43f465c6abeca1ee1f57d79c946df0ba 100644 (file)
@@ -288,9 +288,10 @@ MulticastAgent::MulticastAgent(BaseLB::LDStats* stats, int p): Agent(p)
     LDObjKey *objs = commData.receiver.get_destObjs(nobjs);
     for (int i=0; i<nobjs; i++) {
        int receiver = stats->getHash(objs[i]);
-       if((sender == -1)||(receiver == -1))
+       if((sender == -1)||(receiver == -1)) {
          if (_lb_args.migObjOnly()) continue;
          else CkAbort("Error in search\n");
+       }
        objmap[receiver].push_back(mID);
        minfo.objs.push_back(receiver);
     }