Widen integers being stuffed into objPtr to silence warnings
authorPhil Miller <mille121@illinois.edu>
Sun, 25 Dec 2011 05:06:10 +0000 (23:06 -0600)
committerPhil Miller <mille121@illinois.edu>
Sun, 25 Dec 2011 07:49:16 +0000 (01:49 -0600)
src/ck-core/ck.C

index ec67dfee7f9162fa119579a894054621f1e040bc..15a1cec8597a9236d88848713ac5f4467b1df36b 100644 (file)
@@ -63,7 +63,7 @@ Chare::Chare(void) {
 #ifndef CMK_CHARE_USE_PTR
      // for plain chare, objPtr is actually the index to chare obj table
   if (CkpvAccess(currentChareIdx) >= 0) {
 #ifndef CMK_CHARE_USE_PTR
      // for plain chare, objPtr is actually the index to chare obj table
   if (CkpvAccess(currentChareIdx) >= 0) {
-    thishandle.objPtr=(void*)CkpvAccess(currentChareIdx);
+    thishandle.objPtr=(void*)(CmiIntPtr)CkpvAccess(currentChareIdx);
   }
   chareIdx = CkpvAccess(currentChareIdx);
 #endif
   }
   chareIdx = CkpvAccess(currentChareIdx);
 #endif
@@ -130,7 +130,7 @@ void Chare::pup(PUP::er &p)
   thishandle.objPtr=(void *)this;
 #ifndef CMK_CHARE_USE_PTR
   p(chareIdx);
   thishandle.objPtr=(void *)this;
 #ifndef CMK_CHARE_USE_PTR
   p(chareIdx);
-  if (chareIdx != -1) thishandle.objPtr=(void*)chareIdx;
+  if (chareIdx != -1) thishandle.objPtr=(void*)(CmiIntPtr)chareIdx;
 #endif
 #if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
        if(p.isUnpacking()){
 #endif
 #if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
        if(p.isUnpacking()){
@@ -648,8 +648,8 @@ void CkCreateChare(int cIdx, int eIdx, void *msg, CkChareID *pCid, int destPE)
 #ifndef CMK_CHARE_USE_PTR
     CkpvAccess(vidblocks).push_back((VidBlock*)pCid->objPtr);
     int idx = CkpvAccess(vidblocks).size()-1;
 #ifndef CMK_CHARE_USE_PTR
     CkpvAccess(vidblocks).push_back((VidBlock*)pCid->objPtr);
     int idx = CkpvAccess(vidblocks).size()-1;
-    pCid->objPtr = (void *)idx;
-    env->setVidPtr((void *)idx);
+    pCid->objPtr = (void *)(CmiIntPtr)idx;
+    env->setVidPtr((void *)(CmiIntPtr)idx);
 #endif
   }
   env->setEpIdx(eIdx);
 #endif
   }
   env->setEpIdx(eIdx);
@@ -905,7 +905,7 @@ static void _processNewVChareMsg(CkCoreState *ck,envelope *env)
       _allocMsg(FillVidMsg, sizeof(CkChareID));
   pCid->onPE = CkMyPe();
 #ifndef CMK_CHARE_USE_PTR
       _allocMsg(FillVidMsg, sizeof(CkChareID));
   pCid->onPE = CkMyPe();
 #ifndef CMK_CHARE_USE_PTR
-  pCid->objPtr = (void*)idx;
+  pCid->objPtr = (void*)(CmiIntPtr)idx;
 #else
   pCid->objPtr = obj;
 #endif
 #else
   pCid->objPtr = obj;
 #endif