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

raj at netperf.org raj at netperf.org
Wed Apr 12 15:51:43 PDT 2006


Author: raj
Date: 2006-04-12 15:51:42 -0700 (Wed, 12 Apr 2006)
New Revision: 152

Modified:
   branches/glib_migration/src/netlib.c
   branches/glib_migration/src/netlib_linux.c
   branches/glib_migration/src/netmsg.c
   branches/glib_migration/src/netserver.c
   branches/glib_migration/src/netsysstats_common.c
   branches/glib_migration/src/nettest_bsd.c
   branches/glib_migration/src/nettest_dns.c
Log:
Misc warning cleanup. Still some nits left behind.


Modified: branches/glib_migration/src/netlib.c
===================================================================
--- branches/glib_migration/src/netlib.c	2006-04-12 21:41:59 UTC (rev 151)
+++ branches/glib_migration/src/netlib.c	2006-04-12 22:51:42 UTC (rev 152)
@@ -278,7 +278,7 @@
 xmlNodePtr
 HIST_stats_node(HIST h, char *name)
 {
-  int         i,j;
+
   xmlNodePtr  hist;
   xmlAttrPtr  ap;
   char        value_str[32];
@@ -1396,7 +1396,6 @@
 get_report_function(xmlNodePtr cmd)
 {
   xmlChar  *la_file;
-  char      lib_file[NETPERF_MAX_TEST_LIBRARY_NAME];
   xmlChar  *fname;
   GenReport func;
 
@@ -1448,9 +1447,7 @@
   int      rc = NPE_FUNC_NAME_TOO_LONG;
   char     func_name[NETPERF_MAX_TEST_FUNCTION_NAME];
   xmlChar *la_file;
-  char     lib_file[NETPERF_MAX_TEST_LIBRARY_NAME];
 
-
   if (debug) {
     g_fprintf(where,
 	      "%s enter test %p func %s\n",
@@ -1649,7 +1646,6 @@
 
 {
   int rc;
-  thread_launch_state_t *launch_state;
 
   NETPERF_THREAD_T temp_tid;
 

Modified: branches/glib_migration/src/netlib_linux.c
===================================================================
--- branches/glib_migration/src/netlib_linux.c	2006-04-12 21:41:59 UTC (rev 151)
+++ branches/glib_migration/src/netlib_linux.c	2006-04-12 22:51:42 UTC (rev 152)
@@ -100,16 +100,16 @@
 			     &mask);
   }
   if (err) {
-    if (err == EINVAL) {
+    if (errno == EINVAL) {
       err_str = "Invalid locality value";
     }
-    if (err == EPERM) {
+    if (errno == EPERM) {
       err_str = "Netserver Permission Failure";
     }
-    if (err == ESRCH) {
+    if (errno == ESRCH) {
       err_str = "Invalid thread id";
     }
-    if (err == EFAULT) {
+    if (errno == EFAULT) {
       err_str = "Invalid memory address";
     }
     if (err == -1) {
@@ -139,7 +139,7 @@
     CPU_SET(i,&mask);
   }
 
-  i = sched_setaffinity(pthread_self,
+  i = sched_setaffinity(pthread_self(),
 			sizeof(mask),
 			&mask);
   /* yes, we really should do some error checking here */

Modified: branches/glib_migration/src/netmsg.c
===================================================================
--- branches/glib_migration/src/netmsg.c	2006-04-12 21:41:59 UTC (rev 151)
+++ branches/glib_migration/src/netmsg.c	2006-04-12 22:51:42 UTC (rev 152)
@@ -1039,7 +1039,7 @@
   int          rc = NPE_SUCCESS;
   xmlChar     *testid;
   test_t      *test;
-  xmlNodePtr  stats;
+  xmlNodePtr  stats = NULL;
 
   testid = xmlGetProp(msg,(const xmlChar *)"tid");
   test   = find_test_in_hash(testid);
@@ -1080,7 +1080,7 @@
   int          rc = NPE_SUCCESS;
   xmlChar     *testid;
   test_t      *test;
-  xmlNodePtr  stats;
+  xmlNodePtr  stats = NULL;
 
 
   testid = xmlGetProp(msg,(const xmlChar *)"tid");

Modified: branches/glib_migration/src/netserver.c
===================================================================
--- branches/glib_migration/src/netserver.c	2006-04-12 21:41:59 UTC (rev 151)
+++ branches/glib_migration/src/netserver.c	2006-04-12 22:51:42 UTC (rev 152)
@@ -582,7 +582,7 @@
   test_hash_t  *h;
   xmlNodePtr    msg = NULL;
   xmlNodePtr    new_node;
-  xmlChar      *id;
+  xmlChar      *id = NULL;
   server_t     *netperf;
   char          code[8];
 

Modified: branches/glib_migration/src/netsysstats_common.c
===================================================================
--- branches/glib_migration/src/netsysstats_common.c	2006-04-12 21:41:59 UTC (rev 151)
+++ branches/glib_migration/src/netsysstats_common.c	2006-04-12 22:51:42 UTC (rev 152)
@@ -112,9 +112,9 @@
 
   if (test->debug) {
     fprintf(test->where,"\tdelta_sec  = %d\t%d\t%d\n",
-            dtime->tv_sec,curr->tv_sec,prev->tv_sec);
+            (int)dtime->tv_sec,(int)curr->tv_sec,(int)prev->tv_sec);
     fprintf(test->where,"\tdelta_usec = %d\t%d\t%d\n",
-            dtime->tv_usec,curr->tv_usec,prev->tv_usec);
+            (int)dtime->tv_usec,(int)curr->tv_usec,(int)prev->tv_usec);
     fflush(test->where);
   }
 
@@ -130,14 +130,14 @@
 
   if (test->debug) {
     fprintf(test->where,"\tdelta_sec  = %d\t%d\t%d\n",
-            dtime->tv_sec,curr->tv_sec,prev->tv_sec);
+            (int)dtime->tv_sec,(int)curr->tv_sec,(int)prev->tv_sec);
     fprintf(test->where,"\tdelta_usec = %d\t%d\t%d\n",
-            dtime->tv_usec,curr->tv_usec,prev->tv_usec);
+            (int)dtime->tv_usec,(int)curr->tv_usec,(int)prev->tv_usec);
     fflush(test->where);
   }
 
   if (test->debug) {
-    fprintf(test->where,"\tttime = %d.%d\n",ttime->tv_sec,ttime->tv_usec);
+    fprintf(test->where,"\tttime = %d.%d\n",(int)ttime->tv_sec,(int)ttime->tv_usec);
     fflush(test->where);
   }
 
@@ -150,7 +150,7 @@
   }
 
   if (test->debug) {
-    fprintf(test->where,"\tttime = %d.%d\n",ttime->tv_sec,ttime->tv_usec);
+    fprintf(test->where,"\tttime = %d.%d\n",(int)ttime->tv_sec,(int)ttime->tv_usec);
     fflush(test->where);
   }
 

Modified: branches/glib_migration/src/nettest_bsd.c
===================================================================
--- branches/glib_migration/src/nettest_bsd.c	2006-04-12 21:41:59 UTC (rev 151)
+++ branches/glib_migration/src/nettest_bsd.c	2006-04-12 22:51:42 UTC (rev 152)
@@ -1817,7 +1817,7 @@
 static uint32_t
 recv_tcp_rr_meas(test_t *test)
 {
-  int               len;
+  int               len = -1;
   int               bytes_left;
   char             *req_ptr;
   uint32_t          new_state;
@@ -1892,7 +1892,7 @@
 static uint32_t
 recv_tcp_rr_load(test_t *test)
 {
-  int               len;
+  int               len=-1;
   int               bytes_left;
   char             *req_ptr;
   uint32_t          new_state;

Modified: branches/glib_migration/src/nettest_dns.c
===================================================================
--- branches/glib_migration/src/nettest_dns.c	2006-04-12 21:41:59 UTC (rev 151)
+++ branches/glib_migration/src/nettest_dns.c	2006-04-12 22:51:42 UTC (rev 152)
@@ -1576,7 +1576,7 @@
 {
   uint32_t          new_state;
   int               ret;
-  int               len;
+  int               len = -1;
   int               bytes_left;
   uint16_t         *rsp_ptr;
   dns_data_t       *my_data;



More information about the netperf-dev mailing list