avoid pup void *
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 7 Nov 2005 02:44:18 +0000 (02:44 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 7 Nov 2005 02:44:18 +0000 (02:44 +0000)
src/ck-core/debug-message.C
src/libs/ck-libs/tcharm/tcharm.C
src/util/pup_c.C

index 32ae5b69c7ed2c193f4237a589b2e33bfad51c27..6a545005a196bd6f08a2ed9aa6913b0d1cf0a1aa 100644 (file)
@@ -61,7 +61,7 @@ void CkPupMessage(PUP::er &p,void **atMsg,int pack_mode) {
                env=_allocEnv(type,userSize,prioBits);
        if (pack_mode == 1) {
          /*Pup entire header and message as raw bytes.*/
-         p((void *)env,size);
+         p((char *)env,size);
        } 
        else if (pack_mode == 2) {
            /*Pup header in detail and message separately.*/
@@ -94,17 +94,17 @@ void envelope::pup(PUP::er &p) {
        if (!p.isUnpacking()) convHeaderSize = CmiReservedHeaderSize;
        p(convHeaderSize);
        //puping converse hdr hopefully not go beyond boundry
-       p((void *)core,convHeaderSize);
+       p((char *)core,convHeaderSize);
        p(ref);
-       p((void *)&attribs,sizeof(attribs));
+       p((char *)&attribs,sizeof(attribs));
        p(epIdx);
        p(pe);
        p(event);
-       p(getPrioPtr(),getPrioBytes());
+       p((char*)getPrioPtr(),getPrioBytes());
        switch(getMsgtype()) {
        case NewChareMsg: case NewVChareMsg: 
        case ForChareMsg: case ForVidMsg: case FillVidMsg:
-               p((void *)&(type.chare.ptr),sizeof(void *));
+               p((char *)&(type.chare.ptr),sizeof(void *));
                p(type.chare.forAnyPe);
                break;
        case BocInitMsg: case ForNodeBocMsg: case ForBocMsg:
@@ -136,5 +136,5 @@ void CkMessage::pup(PUP::er &p) {
        //Default message pup: just copy user portion as bytes
        envelope *env=UsrToEnv((void *)this);
        int userSize=env->getTotalsize()-sizeof(envelope)-env->getPrioBytes();
-       p((void *)this,userSize);
+       p((char *)this,userSize);
 }
index 5b3e2485c2e92b1c256a97d7961400432fd824e6..a90dc70ba06338cd7bf69a0938002aaccadbf53a 100644 (file)
@@ -269,15 +269,15 @@ void TCharm::UserData::pup(PUP::er &p)
   p(mode);
   switch(mode) {
   case 'c': { /* C mode: userdata is on the stack, so keep address */
-     p((void*)&data,sizeof(data));
+     p((char*)&data,sizeof(data));
      //FIXME: function pointers may not be valid across processors
-     p((void*)&cfn, sizeof(TCHARM_Pup_fn));
+     p((char*)&cfn, sizeof(TCHARM_Pup_fn));
      if (cfn) cfn(pext,data);
      } break;
   case 'g': { /* Global mode: zero out userdata on arrival */
      if (p.isUnpacking()) data=0;
      //FIXME: function pointers may not be valid across processors
-     p((void*)&gfn, sizeof(TCHARM_Pup_global_fn));
+     p((char*)&gfn, sizeof(TCHARM_Pup_global_fn));
      if (gfn) gfn(pext);
      } break;
   default:
index 337729c3132589d6e5eb4894ea5c054869bfd78a..c74ff0f28fee8912342ca62c6819ade30ccb0977 100644 (file)
@@ -95,10 +95,10 @@ PUP_BASIC_DATATYPEF(DOUBLE,double,double)
 /*Pack/unpack untyped byte array:*/
 CDECL void pup_bytes(pup_er p,void *ptr,int nBytes)
 {
-  mp(ptr,nBytes);
+  mp((char *)ptr,nBytes);
 }
 
 FDECL void FTN_NAME(FPUP_BYTES,fpup_bytes)(pup_er p,void *ptr,int *nBytes)
 {
-  mp(ptr,*nBytes);
+  mp((char *)ptr,*nBytes);
 }