[netperf-dev] netperf4 commit notice r159 - branches/glib_migration/src

raj at netperf.org raj at netperf.org
Mon Apr 17 15:04:42 PDT 2006


Author: raj
Date: 2006-04-17 15:04:40 -0700 (Mon, 17 Apr 2006)
New Revision: 159

Modified:
   branches/glib_migration/src/netlib.c
   branches/glib_migration/src/netlib_linux.c
   branches/glib_migration/src/netmsg.c
   branches/glib_migration/src/netperf.c
   branches/glib_migration/src/nettest_bsd.c
   branches/glib_migration/src/nettest_vst.c
Log:
Fix some -Wall warnings


Modified: branches/glib_migration/src/netlib.c
===================================================================
--- branches/glib_migration/src/netlib.c	2006-04-14 19:56:08 UTC (rev 158)
+++ branches/glib_migration/src/netlib.c	2006-04-17 22:04:40 UTC (rev 159)
@@ -1625,7 +1625,7 @@
     *(pthread_t *)(test->native_thread_id_ptr) = pthread_self();
   }
   if (debug) {
-    fprintf(where,"%s my thread id is %d\n",__func__,pthread_self());
+    fprintf(where,"%s my thread id is %ld\n",__func__,pthread_self());
     fflush(where);
   }
 #endif

Modified: branches/glib_migration/src/netlib_linux.c
===================================================================
--- branches/glib_migration/src/netlib_linux.c	2006-04-14 19:56:08 UTC (rev 158)
+++ branches/glib_migration/src/netlib_linux.c	2006-04-17 22:04:40 UTC (rev 159)
@@ -1,4 +1,4 @@
-static char netlib_specific_id[]="\
+char netlib_specific_id[]="\
 @(#)(c) Copyright 2006, Hewlett-Packard Company, $Id$";
 
 /*

Modified: branches/glib_migration/src/netmsg.c
===================================================================
--- branches/glib_migration/src/netmsg.c	2006-04-14 19:56:08 UTC (rev 158)
+++ branches/glib_migration/src/netmsg.c	2006-04-17 22:04:40 UTC (rev 159)
@@ -926,8 +926,7 @@
     if (rc == NPE_SUCCESS) {
       if (debug) {
         fprintf(where,
-                "test_message: about to launch thread %d for test using func %p\n",
-                new_test->thread_id,
+                "test_message: launching test thread using func %p\n",
                 new_test->test_func);
         fflush(where);
       }
@@ -957,8 +956,7 @@
 	rc = launch_thread(&new_test->thread_id,launch_pad,launch_state);
 	if (debug) {
 	  fprintf(where,
-		  "test_message: launched thread %d for test\n",
-		  new_test->thread_id);
+		  "test_message: launched test thread\n");
 	  fflush(where);
 	}
 	/* having launched the test thread, we really aught to unbind
@@ -975,16 +973,14 @@
       while (new_test->new_state == TEST_PREINIT) {
         if (debug) {
           fprintf(where,
-                  "test_message: waiting on thread %d\n",
-                  new_test->thread_id);
+                  "test_message: waiting on thread\n");
           fflush(where);
         }
         g_usleep(1000000);
       }  /* end wait */
       if (debug) {
         fprintf(where,
-                "test_message: test has finished initialization on thread %d\n",
-                new_test->thread_id);
+                "test_message: test initialization finished on thread\n");
         fflush(where);
       }
     }

Modified: branches/glib_migration/src/netperf.c
===================================================================
--- branches/glib_migration/src/netperf.c	2006-04-14 19:56:08 UTC (rev 158)
+++ branches/glib_migration/src/netperf.c	2006-04-17 22:04:40 UTC (rev 159)
@@ -941,9 +941,8 @@
         NETPERF_MUTEX_UNLOCK(h->hash_lock);
         if (debug > 1) {
           fprintf(where,
-                  "resolve_dependency: waiting on test %s thread %d\n",
-                  (char *)id,
-                  test->thread_id);
+                  "resolve_dependency: waiting on test %s\n",
+                  (char *)id);
           fflush(where);
         }
 
@@ -1216,8 +1215,9 @@
         /* netserver worker thread is not yet initialized start it */
         rc = launch_thread(&server->thread_id, netperf_worker, server);
         if (debug) {
-          fprintf(where,"launched thread %d for netserver %s\n",
-                  server->thread_id,server->id);
+          fprintf(where,
+		  "launched thread for netserver %s\n",
+		  server->id);
           fflush(where);
         }
         NETPERF_MUTEX_LOCK(h->hash_lock);

Modified: branches/glib_migration/src/nettest_bsd.c
===================================================================
--- branches/glib_migration/src/nettest_bsd.c	2006-04-14 19:56:08 UTC (rev 158)
+++ branches/glib_migration/src/nettest_bsd.c	2006-04-17 22:04:40 UTC (rev 159)
@@ -150,7 +150,7 @@
 
 
 static void
-report_test_failure(test_t *test, char *function, int err_code, char * err_string) {
+report_test_failure(test_t *test, char *function, int err_code, const char * err_string) {
   if (test->debug) {
     fprintf(test->where,"%s: called report_test_failure:",function);
     fprintf(test->where,"reporting  %s  errno = %d\n",err_string,GET_ERRNO);
@@ -158,7 +158,7 @@
   }
   test->err_rc    = err_code;
   test->err_fn    = function;
-  test->err_str   = err_string;
+  test->err_str   = (char *)err_string;
   test->new_state = TEST_ERROR;
   test->err_no    = GET_ERRNO;
 }

Modified: branches/glib_migration/src/nettest_vst.c
===================================================================
--- branches/glib_migration/src/nettest_vst.c	2006-04-14 19:56:08 UTC (rev 158)
+++ branches/glib_migration/src/nettest_vst.c	2006-04-17 22:04:40 UTC (rev 159)
@@ -903,7 +903,7 @@
     if (test->debug && loc_debug) {
       fprintf(test->where, "**** end of pattern reached ******\n");
       fprintf(test->where,
-              "%s:  value = %d  key = %d\n",
+              "%s:  value = %d  key = %ld\n",
               (char *)__func__, value, key);
       fflush(test->where);
     }
@@ -911,7 +911,7 @@
       value = value - dist->dist_count[i];
       if (test->debug && loc_debug) {
         fprintf(test->where,
-                "\tdist_count = %d  new_value = %d  pattern = %d\n",
+                "\tdist_count = %d  new_value = %d  pattern = %ld\n",
                 dist->dist_count[i], value, dist->pattern[i]);
         fflush(test->where);
       }
@@ -1210,7 +1210,6 @@
   int               error;
   struct addrinfo   hints;
   struct addrinfo  *local_ai;
-  struct addrinfo  *local_temp;
 
   NETPERF_DEBUG_ENTRY(test->debug, test->where);
 
@@ -1419,7 +1418,7 @@
 {
   xmlNodePtr  stats = NULL;
   xmlAttrPtr  ap    = NULL;
-  int         i,j;
+  int         i;
   char        value[32];
   char        name[32];
   uint64_t    loc_cnt[VST_MAX_COUNTERS];
@@ -2533,7 +2532,6 @@
   FILE          *outfd;
   vst_results_t *rd;
   double         elapsed_seconds;
-  double         sys_util;
   double         calibration;
   double         local_idle;
   double         local_busy;



More information about the netperf-dev mailing list