diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-04-22 15:43:01 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-04-22 15:43:01 +0000 |
commit | 14a7f2a7f84084cc90e9dcd9f3388f27480b3c40 (patch) | |
tree | c1139efd4fb75032d85b22532b7fa86ae529d26e /gtk | |
parent | 467b527ea2a221b77e41fdc03964caed94236ea3 (diff) |
some updates to allow gtk1 to compile without warnings
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21500 f5534014-38df-0310-8fa8-9805f1628bb7
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); |