Debug interface: Make 64-bit check static to quiet size-mismatch warnings
authorPhil Miller <mille121@illinois.edu>
Wed, 21 Dec 2011 22:44:14 +0000 (16:44 -0600)
committerPhil Miller <mille121@illinois.edu>
Wed, 21 Dec 2011 22:44:14 +0000 (16:44 -0600)
src/conv-core/debug-conv.c

index 07cc72b9d3fe89a91c50a2d4f4405c0d8e1e9bc8..dfe6e99a16060481b9816d3f4caac1eb2166082e 100644 (file)
@@ -61,17 +61,17 @@ void CpdSearchLeaksDone(void *msg) {
 void CpdSearchLeaks(char * msg) {
   LeakSearchInfo *info = (LeakSearchInfo *)(msg+CmiMsgHeaderSizeBytes);
   if (CmiMyPe() == info->pe || (info->pe == -1 && CmiMyPe() == 0)) {
-    if (sizeof(char*) == 8) {
+#if CMK_64BIT
       info->begin_data = (((CmiUInt8)ntohl(((int*)&info->begin_data)[0]))<<32) + ntohl(((int*)&info->begin_data)[1]);
       info->end_data = (((CmiUInt8)ntohl(((int*)&info->end_data)[0]))<<32) + ntohl(((int*)&info->end_data)[1]);
       info->begin_bss = (((CmiUInt8)ntohl(((int*)&info->begin_bss)[0]))<<32) + ntohl(((int*)&info->begin_bss)[1]);
       info->end_bss = (((CmiUInt8)ntohl(((int*)&info->end_bss)[0]))<<32) + ntohl(((int*)&info->end_bss)[1]);
-    } else {
+#else
       info->begin_data = ntohl((int)info->begin_data);
       info->end_data = ntohl((int)info->end_data);
       info->begin_bss = ntohl((int)info->begin_bss);
       info->end_bss = ntohl((int)info->end_bss);
-    }
+#endif
     info->quick = ntohl(info->quick);
     info->pe = ntohl(info->pe);
     CpvAccess(leakSearchDelayedReply) = CcsDelayReply();