fixed for VC++
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 7 Jun 2011 17:04:11 +0000 (12:04 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 7 Jun 2011 17:04:11 +0000 (12:04 -0500)
src/arch/util/machine-common.c

index 541715c2872dda9496ccbce34f99ed8a9e7b43fe..5ac83ddf019fe2b0b07831b7ab4bfdf9668f7265 100644 (file)
@@ -473,6 +473,7 @@ static INLINE_KEYWORD void processNodeBcastMsg(int size, char *msg) {
 static void SendSpanningChildren(int size, char *msg, int rankToAssign, int startNode) {
 #if CMK_BROADCAST_SPANNING_TREE
     int i, oldRank;
+    char *newmsg;
 
     oldRank = CMI_DEST_RANK(msg);
     /* doing this is to avoid the multiple assignment in the following for loop */
@@ -491,7 +492,7 @@ static void SendSpanningChildren(int size, char *msg, int rankToAssign, int star
         CmiReference(msg);
         CmiMachineSpecificSendFunc(nd, size, msg, P2P_SYNC);
 #else
-        char *newmsg = CopyMsg(msg, size);
+        newmsg = CopyMsg(msg, size);
         CmiMachineSpecificSendFunc(nd, size, newmsg, P2P_SYNC);
 #endif
     }