]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-xstat-printf-ptr-format-20090320
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 20 Mar 2009 17:10:19 +0000 (17:10 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 20 Mar 2009 17:10:19 +0000 (17:10 +0000)
LICENSE IPL10

make use of AFS_PTR_FMT to avoid warnings on Windows.

(cherry picked from commit 218f08ffedb8c75e0314ab00000adf8419fdfe7b)

src/xstat/xstat_cm.c
src/xstat/xstat_fs.c
src/xstat/xstat_fs_callback.c
src/xstat/xstat_fs_test.c

index d89daa243efa7687415378ae1351b79965314604..e998d1c13cadc12f7ab079c6098fbb0dddac5ba4 100644 (file)
@@ -264,12 +264,12 @@ xstat_cm_LWP(void *unused)
 
                    if (xstat_cm_debug) {
                        printf
-                           ("%s: Calling RXAFSCB_GetXStats, conn=0x%x, clientVersionNumber=%d, collectionNumber=%d, srvVersionNumberP=0x%x, timeP=0x%x, dataP=0x%x\n",
+                           ("%s: Calling RXAFSCB_GetXStats, conn=0x%" AFS_PTR_FMT ", clientVersionNumber=%d, collectionNumber=%d, srvVersionNumberP=0x%" AFS_PTR_FMT ", timeP=0x%" AFS_PTR_FMT ", dataP=0x%" AFS_PTR_FMT "\n",
                             rn, curr_conn->rxconn, clientVersionNumber,
                             *currCollIDP, &srvVersionNumber,
                             &(xstat_cm_Results.probeTime),
                             &(xstat_cm_Results.data));
-                       printf("%s: [bufflen=%d, buffer at 0x%x]\n", rn,
+                       printf("%s: [bufflen=%d, buffer at 0x%" AFS_PTR_FMT "]\n", rn,
                               xstat_cm_Results.data.AFSCB_CollData_len,
                               xstat_cm_Results.data.AFSCB_CollData_val);
                    }
@@ -321,7 +321,7 @@ xstat_cm_LWP(void *unused)
             * that we've finished our collection round.
             */
            if (xstat_cm_debug)
-               printf("[%s] Signalling main process at 0x%x\n", rn,
+               printf("[%s] Signalling main process at 0x%" AFS_PTR_FMT "\n", rn,
                       &terminationEvent);
            oneShotCode = LWP_SignalProcess(&terminationEvent);
            if (oneShotCode)
@@ -525,7 +525,7 @@ xstat_cm_Init(int a_numServers, struct sockaddr_in *a_socketArray,
         */
        if (xstat_cm_debug) {
            printf("[%s] Copying in the following socket info:\n", rn);
-           printf("[%s] IP addr 0s, port %d\n", rn,
+           printf("[%s] IP addr 0s, port %d\n",
                   afs_inet_ntoa_r((a_socketArray + curr_srv)->sin_addr.s_addr,hoststr),
                   ntohs((a_socketArray + curr_srv)->sin_port));
        }
@@ -566,7 +566,7 @@ xstat_cm_Init(int a_numServers, struct sockaddr_in *a_socketArray,
            conn_err = 1;
        }
        if (xstat_cm_debug)
-           printf("[%s] New connection at 0x%lx\n", rn, curr_conn->rxconn);
+           printf("[%s] New connection at 0x%" AFS_PTR_FMT "\n", rn, curr_conn->rxconn);
 
        /*
         * Bump the current xstat_cm connection to set up.
@@ -593,7 +593,7 @@ xstat_cm_Init(int a_numServers, struct sockaddr_in *a_socketArray,
        return (code);
     }
     if (xstat_cm_debug)
-       printf("[%s] Probe LWP process structure located at 0x%x\n", rn,
+       printf("[%s] Probe LWP process structure located at 0x%" AFS_PTR_FMT "\n", rn,
               probeLWP_ID);
 
     /*
index c582312e3a04f743e69dff7030b2f11aee7a7c51..146b7e43e0cea9120d5daf195412f3dfd8e1a2c4 100644 (file)
@@ -303,12 +303,12 @@ xstat_fs_LWP(void *unused)
 
                    if (xstat_fs_debug) {
                        printf
-                           ("%s: Calling RXAFS_GetXStats, conn=0x%x, clientVersionNumber=%d, collectionNumber=%d, srvVersionNumberP=0x%x, timeP=0x%x, dataP=0x%x\n",
+                           ("%s: Calling RXAFS_GetXStats, conn=0x%" AFS_PTR_FMT ", clientVersionNumber=%d, collectionNumber=%d, srvVersionNumberP=0x%" AFS_PTR_FMT ", timeP=0x%" AFS_PTR_FMT ", dataP=0x%" AFS_PTR_FMT "\n",
                             rn, curr_conn->rxconn, clientVersionNumber,
                             *currCollIDP, &srvVersionNumber,
                             &(xstat_fs_Results.probeTime),
                             &(xstat_fs_Results.data));
-                       printf("%s: [bufflen=%d, buffer at 0x%x]\n", rn,
+                       printf("%s: [bufflen=%d, buffer at 0x%" AFS_PTR_FMT "]\n", rn,
                               xstat_fs_Results.data.AFS_CollData_len,
                               xstat_fs_Results.data.AFS_CollData_val);
                    }
@@ -360,7 +360,7 @@ xstat_fs_LWP(void *unused)
             * that we've finished our collection round.
             */
            if (xstat_fs_debug)
-               printf("[%s] Signalling main process at 0x%x\n", rn,
+               printf("[%s] Signalling main process at 0x%" AFS_PTR_FMT "\n", rn,
                       &terminationEvent);
            oneShotCode = LWP_SignalProcess(&terminationEvent);
            if (oneShotCode)
@@ -636,7 +636,7 @@ xstat_fs_Init(int a_numServers, struct sockaddr_in *a_socketArray,
            conn_err = 1;
        }
        if (xstat_fs_debug)
-           printf("[%s] New connection at 0x%lx\n", rn, curr_conn->rxconn);
+           printf("[%s] New connection at 0x%" AFS_PTR_FMT "\n", rn, curr_conn->rxconn);
 
        /*
         * Bump the current xstat_fs connection to set up.
@@ -690,7 +690,7 @@ xstat_fs_Init(int a_numServers, struct sockaddr_in *a_socketArray,
        return (code);
     }
     if (xstat_fs_debug)
-       printf("[%s] Probe LWP process structure located at 0x%x\n", rn,
+       printf("[%s] Probe LWP process structure located at 0x%" AFS_PTR_FMT "\n", rn,
               probeLWP_ID);
 
     /*
index d580e9d2ded83ea364bcf1df788e4daec43f3163..1e8e7a69afa1b5659b2eb17a7938f02155397c2c 100644 (file)
@@ -490,9 +490,7 @@ SRXAFSCB_InitCallBackState2(struct rx_call * rxcall,
 afs_int32
 SRXAFSCB_WhoAreYou(struct rx_call * rxcall, struct interfaceAddr * addr)
 {
-    int i;
     int code = 0;
-    int count;
 
 #if XSTAT_FS_CALLBACK_VERBOSE
     static char rn[] = "SRXAFSCB_WhoAreYou";   /*Routine name */
@@ -753,9 +751,7 @@ SRXAFSCB_TellMeAboutYourself(struct rx_call * rxcall,
                             struct interfaceAddr * addr,
                             Capabilities * capabilites)
 {
-    int i;
     int code = 0;
-    int count;
 
 #if XSTAT_FS_CALLBACK_VERBOSE
     static char rn[] = "SRXAFSCB_TellMeAboutYourself"; /*Routine name */
index 0c97afbb2495927cdb1464ee30759b8e8894503a..058470efa259edfd9680a3f6e56d5e6174aeb0fc 100644 (file)
@@ -131,7 +131,7 @@ PrintCallInfo()
           printableTime);
 
     if (debugging_on)
-       printf("\n[%d entries returned at 0x%x]\n\n", numInt32s, currInt32);
+       printf("\n[%d entries returned at 0x%" AFS_PTR_FMT "]\n\n", numInt32s, currInt32);
 
     for (i = 0; i < numInt32s; i++)
        printf("%d ", *currInt32++);
@@ -789,7 +789,7 @@ RunTheTest(struct cmd_syndesc *a_s)
         * One-shot operation; just wait for the collection to be done.
         */
        if (debugging_on)
-           printf("[%s] Calling LWP_WaitProcess() on event 0x%x\n", rn,
+           printf("[%s] Calling LWP_WaitProcess() on event 0x%" AFS_PTR_FMT "\n", rn,
                   &terminationEvent);
        waitCode = LWP_WaitProcess(&terminationEvent);
        if (debugging_on)