gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r7088 - in gnunet-gtk/src/plugins: fs peers stats


From: gnunet
Subject: [GNUnet-SVN] r7088 - in gnunet-gtk/src/plugins: fs peers stats
Date: Sat, 7 Jun 2008 21:59:54 -0600 (MDT)

Author: grothoff
Date: 2008-06-07 21:59:54 -0600 (Sat, 07 Jun 2008)
New Revision: 7088

Modified:
   gnunet-gtk/src/plugins/fs/search.c
   gnunet-gtk/src/plugins/peers/peers.c
   gnunet-gtk/src/plugins/stats/functions.c
   gnunet-gtk/src/plugins/stats/functions.h
   gnunet-gtk/src/plugins/stats/statistics.c
Log:
fixing warnings with respect to signed/unsigned

Modified: gnunet-gtk/src/plugins/fs/search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/search.c  2008-06-08 03:36:13 UTC (rev 7087)
+++ gnunet-gtk/src/plugins/fs/search.c  2008-06-08 03:59:54 UTC (rev 7088)
@@ -155,8 +155,9 @@
             if (availability_rank < 0)
               {
                 if ((x * GNUNET_FSUI_MAX_PROBES >
-                     (GNUNET_FSUI_MAX_PROBES +
-                      availability_rank) * P_WIDTH / 2) && (x <= P_WIDTH / 2))
+                     ((unsigned int) (GNUNET_FSUI_MAX_PROBES +
+                                      availability_rank)) * P_WIDTH / 2)
+                    && (x <= P_WIDTH / 2))
                   {
                     pixel[PX_RED] = 255;
                     pixel[PX_GREEN] = 0;
@@ -168,7 +169,7 @@
               {
                 if ((x >= P_WIDTH / 2) &&
                     ((x - (P_WIDTH / 2)) * GNUNET_FSUI_MAX_PROBES <
-                     availability_rank * P_WIDTH / 2))
+                     ((unsigned int) availability_rank) * P_WIDTH / 2))
                   {
                     pixel[PX_RED] = 0;
                     pixel[PX_GREEN] = 255;
@@ -662,7 +663,7 @@
   GtkTreePath *path;
   GtkTreeIter iter;
   int col;
-  int i;
+  unsigned int i;
 
   /* check that search does not already exist
      with fsui_list == NULL;

Modified: gnunet-gtk/src/plugins/peers/peers.c
===================================================================
--- gnunet-gtk/src/plugins/peers/peers.c        2008-06-08 03:36:13 UTC (rev 
7087)
+++ gnunet-gtk/src/plugins/peers/peers.c        2008-06-08 03:59:54 UTC (rev 
7088)
@@ -79,7 +79,7 @@
   char *haddress;
   char *hostname;
   GNUNET_CronTime now;
-  int i;
+  unsigned int i;
   int found;
   struct Flags *pos;
 

Modified: gnunet-gtk/src/plugins/stats/functions.c
===================================================================
--- gnunet-gtk/src/plugins/stats/functions.c    2008-06-08 03:36:13 UTC (rev 
7087)
+++ gnunet-gtk/src/plugins/stats/functions.c    2008-06-08 03:59:54 UTC (rev 
7088)
@@ -445,8 +445,8 @@
    */
   static unsigned int last;
   GNUNET_CronTime *delta = data;
-  int j;
-  int found;
+  unsigned int j;
+  unsigned int found;
 
   if (last >= lsv_size)
     last = 0;
@@ -454,7 +454,7 @@
   found = -1;
   if ((j < lsv_size) && (0 == strcmp (optName, lastStatValues[j].statName)))
     found = j;
-  if (found == -1)
+  if (found == (unsigned int) -1)
     {
       for (j = 0; j < lsv_size; j++)
         {
@@ -465,7 +465,7 @@
             }
         }
     }
-  if (found == -1)
+  if (found == (unsigned int) -1)
     {
       found = lsv_size;
       GNUNET_array_grow (lastStatValues, lsv_size, lsv_size + 1);
@@ -492,7 +492,7 @@
 {
   struct UpdateClosure *uc = cls;
   static gboolean once = TRUE;
-  static int last_status = -5;
+  static long long last_status = -5;
   unsigned long long connected_peers;
   char *label;
   static GtkWidget *statusConnexionsLabel;
@@ -598,7 +598,7 @@
         }
       else if (connected_peers > 0)
         {
-          if (last_status != connected_peers)
+          if (last_status != (long long) connected_peers)
             {
               if (connected_peers == 1)
                 {
@@ -631,7 +631,7 @@
 #endif
               gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic),
                                         GTK_STOCK_NETWORK, 1);
-              last_status = connected_peers;
+              last_status = (long long) connected_peers;
             }
         }
       else if (last_status != 0)
@@ -792,7 +792,7 @@
 void
 done_functions ()
 {
-  int i;
+  unsigned int i;
 
   GNUNET_cron_del_job (cron, &updateConnectionGoal, 5 * GNUNET_CRON_MINUTES,
                        NULL);

Modified: gnunet-gtk/src/plugins/stats/functions.h
===================================================================
--- gnunet-gtk/src/plugins/stats/functions.h    2008-06-08 03:36:13 UTC (rev 
7087)
+++ gnunet-gtk/src/plugins/stats/functions.h    2008-06-08 03:59:54 UTC (rev 
7088)
@@ -46,7 +46,7 @@
   UpdateData getData;
   void *get_closure;
   unsigned int count;
-  int fill;                     /* fill first "fill" entries */
+  unsigned int fill;            /* fill first "fill" entries */
 } StatEntry;
 
 extern StatEntry stats[];

Modified: gnunet-gtk/src/plugins/stats/statistics.c
===================================================================
--- gnunet-gtk/src/plugins/stats/statistics.c   2008-06-08 03:36:13 UTC (rev 
7087)
+++ gnunet-gtk/src/plugins/stats/statistics.c   2008-06-08 03:59:54 UTC (rev 
7088)
@@ -245,7 +245,7 @@
 static void
 load_graph_unalloc (LoadGraph * g)
 {
-  int i;
+  unsigned int i;
   if (!g->allocated)
     return;
   for (i = 0; i < g->num_points; i++)
@@ -267,8 +267,8 @@
 static void
 load_graph_alloc (LoadGraph * g)
 {
-  int i;
-  int j;
+  unsigned int i;
+  unsigned int j;
 
   if (g->allocated)
     return;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]