diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-04-22 15:43:01 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-04-22 15:43:01 +0000 |
commit | 872398a417b5e07b3a3ec812cef1d547450d6e8c (patch) | |
tree | c1139efd4fb75032d85b22532b7fa86ae529d26e /gtk | |
parent | 7a971357527151422aa4fb4ba8004db4a2961455 (diff) |
some updates to allow gtk1 to compile without warnings
svn path=/trunk/; revision=21500
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/graph_analysis.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk/graph_analysis.c b/gtk/graph_analysis.c index 3589006d36..f362bb9fa2 100644 --- a/gtk/graph_analysis.c +++ b/gtk/graph_analysis.c @@ -32,8 +32,6 @@ #include "config.h" #endif -#include "graph_analysis.h" - #include <epan/epan_dissect.h> #include "util.h" @@ -70,6 +68,8 @@ #include "simple_dialog.h" +#include "graph_analysis.h" + /* XXX FIXME */ /* GTK-1.x does not have GDK_IS_DRAWABLE so just define is as always being true @@ -244,7 +244,12 @@ static void enlarge_string(GString *gstr, guint32 length, char pad){ static void overwrite (GString *gstr, char *text_to_insert, guint32 p1, guint32 p2){ - guint32 pos, len; + guint32 len; +#if GTK_MAJOR_VERSION < 2 + gint pos; +#else + gsize pos; +#endif if (p1 == p2) return; @@ -265,7 +270,8 @@ static void overwrite (GString *gstr, char *text_to_insert, guint32 p1, guint32 if (pos > gstr->len) pos = gstr->len; - if (pos + len > gstr->len) + /* ouch this is ugly but gtk1 needs it */ + if ((guint32)(pos + len) > (guint32)gstr->len) g_string_truncate(gstr, pos); else g_string_erase(gstr, pos, len); |