diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-06-08 03:59:54 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-06-08 03:59:54 +0000 |
commit | 66c000cea09790c8ccff0b8b0be0517ec7a5ed49 (patch) | |
tree | 005c19f30f8dce6afb642bdfb71e7637e7adb9c4 | |
parent | 7d07c002f9e62e8db64458a3f05db7620eb91cd2 (diff) | |
download | gnunet-gtk-66c000cea09790c8ccff0b8b0be0517ec7a5ed49.tar.gz gnunet-gtk-66c000cea09790c8ccff0b8b0be0517ec7a5ed49.zip |
fixing warnings with respect to signed/unsigned
-rw-r--r-- | src/plugins/fs/search.c | 9 | ||||
-rw-r--r-- | src/plugins/peers/peers.c | 2 | ||||
-rw-r--r-- | src/plugins/stats/functions.c | 16 | ||||
-rw-r--r-- | src/plugins/stats/functions.h | 2 | ||||
-rw-r--r-- | src/plugins/stats/statistics.c | 6 |
5 files changed, 18 insertions, 17 deletions
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index fbc62ec3..f733a66e 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -155,8 +155,9 @@ make_ranking_pixbuf (int availability_rank, | |||
155 | if (availability_rank < 0) | 155 | if (availability_rank < 0) |
156 | { | 156 | { |
157 | if ((x * GNUNET_FSUI_MAX_PROBES > | 157 | if ((x * GNUNET_FSUI_MAX_PROBES > |
158 | (GNUNET_FSUI_MAX_PROBES + | 158 | ((unsigned int) (GNUNET_FSUI_MAX_PROBES + |
159 | availability_rank) * P_WIDTH / 2) && (x <= P_WIDTH / 2)) | 159 | availability_rank)) * P_WIDTH / 2) |
160 | && (x <= P_WIDTH / 2)) | ||
160 | { | 161 | { |
161 | pixel[PX_RED] = 255; | 162 | pixel[PX_RED] = 255; |
162 | pixel[PX_GREEN] = 0; | 163 | pixel[PX_GREEN] = 0; |
@@ -168,7 +169,7 @@ make_ranking_pixbuf (int availability_rank, | |||
168 | { | 169 | { |
169 | if ((x >= P_WIDTH / 2) && | 170 | if ((x >= P_WIDTH / 2) && |
170 | ((x - (P_WIDTH / 2)) * GNUNET_FSUI_MAX_PROBES < | 171 | ((x - (P_WIDTH / 2)) * GNUNET_FSUI_MAX_PROBES < |
171 | availability_rank * P_WIDTH / 2)) | 172 | ((unsigned int) availability_rank) * P_WIDTH / 2)) |
172 | { | 173 | { |
173 | pixel[PX_RED] = 0; | 174 | pixel[PX_RED] = 0; |
174 | pixel[PX_GREEN] = 255; | 175 | pixel[PX_GREEN] = 255; |
@@ -662,7 +663,7 @@ fs_search_started (struct GNUNET_FSUI_SearchList * fsui_list, | |||
662 | GtkTreePath *path; | 663 | GtkTreePath *path; |
663 | GtkTreeIter iter; | 664 | GtkTreeIter iter; |
664 | int col; | 665 | int col; |
665 | int i; | 666 | unsigned int i; |
666 | 667 | ||
667 | /* check that search does not already exist | 668 | /* check that search does not already exist |
668 | with fsui_list == NULL; | 669 | with fsui_list == NULL; |
diff --git a/src/plugins/peers/peers.c b/src/plugins/peers/peers.c index 684701ad..7eee5b12 100644 --- a/src/plugins/peers/peers.c +++ b/src/plugins/peers/peers.c | |||
@@ -79,7 +79,7 @@ collector (void *data, | |||
79 | char *haddress; | 79 | char *haddress; |
80 | char *hostname; | 80 | char *hostname; |
81 | GNUNET_CronTime now; | 81 | GNUNET_CronTime now; |
82 | int i; | 82 | unsigned int i; |
83 | int found; | 83 | int found; |
84 | struct Flags *pos; | 84 | struct Flags *pos; |
85 | 85 | ||
diff --git a/src/plugins/stats/functions.c b/src/plugins/stats/functions.c index 256b5de8..b4fbda9c 100644 --- a/src/plugins/stats/functions.c +++ b/src/plugins/stats/functions.c | |||
@@ -445,8 +445,8 @@ statsProcessor (const char *optName, unsigned long long value, void *data) | |||
445 | */ | 445 | */ |
446 | static unsigned int last; | 446 | static unsigned int last; |
447 | GNUNET_CronTime *delta = data; | 447 | GNUNET_CronTime *delta = data; |
448 | int j; | 448 | unsigned int j; |
449 | int found; | 449 | unsigned int found; |
450 | 450 | ||
451 | if (last >= lsv_size) | 451 | if (last >= lsv_size) |
452 | last = 0; | 452 | last = 0; |
@@ -454,7 +454,7 @@ statsProcessor (const char *optName, unsigned long long value, void *data) | |||
454 | found = -1; | 454 | found = -1; |
455 | if ((j < lsv_size) && (0 == strcmp (optName, lastStatValues[j].statName))) | 455 | if ((j < lsv_size) && (0 == strcmp (optName, lastStatValues[j].statName))) |
456 | found = j; | 456 | found = j; |
457 | if (found == -1) | 457 | if (found == (unsigned int) -1) |
458 | { | 458 | { |
459 | for (j = 0; j < lsv_size; j++) | 459 | for (j = 0; j < lsv_size; j++) |
460 | { | 460 | { |
@@ -465,7 +465,7 @@ statsProcessor (const char *optName, unsigned long long value, void *data) | |||
465 | } | 465 | } |
466 | } | 466 | } |
467 | } | 467 | } |
468 | if (found == -1) | 468 | if (found == (unsigned int) -1) |
469 | { | 469 | { |
470 | found = lsv_size; | 470 | found = lsv_size; |
471 | GNUNET_array_grow (lastStatValues, lsv_size, lsv_size + 1); | 471 | GNUNET_array_grow (lastStatValues, lsv_size, lsv_size + 1); |
@@ -492,7 +492,7 @@ updateDaemonStatus (void *cls) | |||
492 | { | 492 | { |
493 | struct UpdateClosure *uc = cls; | 493 | struct UpdateClosure *uc = cls; |
494 | static gboolean once = TRUE; | 494 | static gboolean once = TRUE; |
495 | static int last_status = -5; | 495 | static long long last_status = -5; |
496 | unsigned long long connected_peers; | 496 | unsigned long long connected_peers; |
497 | char *label; | 497 | char *label; |
498 | static GtkWidget *statusConnexionsLabel; | 498 | static GtkWidget *statusConnexionsLabel; |
@@ -598,7 +598,7 @@ updateDaemonStatus (void *cls) | |||
598 | } | 598 | } |
599 | else if (connected_peers > 0) | 599 | else if (connected_peers > 0) |
600 | { | 600 | { |
601 | if (last_status != connected_peers) | 601 | if (last_status != (long long) connected_peers) |
602 | { | 602 | { |
603 | if (connected_peers == 1) | 603 | if (connected_peers == 1) |
604 | { | 604 | { |
@@ -631,7 +631,7 @@ updateDaemonStatus (void *cls) | |||
631 | #endif | 631 | #endif |
632 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), | 632 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), |
633 | GTK_STOCK_NETWORK, 1); | 633 | GTK_STOCK_NETWORK, 1); |
634 | last_status = connected_peers; | 634 | last_status = (long long) connected_peers; |
635 | } | 635 | } |
636 | } | 636 | } |
637 | else if (last_status != 0) | 637 | else if (last_status != 0) |
@@ -792,7 +792,7 @@ init_functions (struct GNUNET_GE_Context *e, | |||
792 | void | 792 | void |
793 | done_functions () | 793 | done_functions () |
794 | { | 794 | { |
795 | int i; | 795 | unsigned int i; |
796 | 796 | ||
797 | GNUNET_cron_del_job (cron, &updateConnectionGoal, 5 * GNUNET_CRON_MINUTES, | 797 | GNUNET_cron_del_job (cron, &updateConnectionGoal, 5 * GNUNET_CRON_MINUTES, |
798 | NULL); | 798 | NULL); |
diff --git a/src/plugins/stats/functions.h b/src/plugins/stats/functions.h index 6d05ce26..053531a9 100644 --- a/src/plugins/stats/functions.h +++ b/src/plugins/stats/functions.h | |||
@@ -46,7 +46,7 @@ typedef struct SE_ | |||
46 | UpdateData getData; | 46 | UpdateData getData; |
47 | void *get_closure; | 47 | void *get_closure; |
48 | unsigned int count; | 48 | unsigned int count; |
49 | int fill; /* fill first "fill" entries */ | 49 | unsigned int fill; /* fill first "fill" entries */ |
50 | } StatEntry; | 50 | } StatEntry; |
51 | 51 | ||
52 | extern StatEntry stats[]; | 52 | extern StatEntry stats[]; |
diff --git a/src/plugins/stats/statistics.c b/src/plugins/stats/statistics.c index ace9615e..b8dd2cd3 100644 --- a/src/plugins/stats/statistics.c +++ b/src/plugins/stats/statistics.c | |||
@@ -245,7 +245,7 @@ load_graph_update (gpointer ptr) | |||
245 | static void | 245 | static void |
246 | load_graph_unalloc (LoadGraph * g) | 246 | load_graph_unalloc (LoadGraph * g) |
247 | { | 247 | { |
248 | int i; | 248 | unsigned int i; |
249 | if (!g->allocated) | 249 | if (!g->allocated) |
250 | return; | 250 | return; |
251 | for (i = 0; i < g->num_points; i++) | 251 | for (i = 0; i < g->num_points; i++) |
@@ -267,8 +267,8 @@ load_graph_unalloc (LoadGraph * g) | |||
267 | static void | 267 | static void |
268 | load_graph_alloc (LoadGraph * g) | 268 | load_graph_alloc (LoadGraph * g) |
269 | { | 269 | { |
270 | int i; | 270 | unsigned int i; |
271 | int j; | 271 | unsigned int j; |
272 | 272 | ||
273 | if (g->allocated) | 273 | if (g->allocated) |
274 | return; | 274 | return; |