aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/follow_ssl.c6
-rw-r--r--gtk/follow_stream.c6
-rw-r--r--gtk/follow_tcp.c4
-rw-r--r--gtk/follow_udp.c4
-rw-r--r--gtk/graph_analysis.c11
-rw-r--r--gtk/main.c4
-rw-r--r--gtk/prefs_gui.c2
-rw-r--r--gtk/recent.c2
8 files changed, 19 insertions, 20 deletions
diff --git a/gtk/follow_ssl.c b/gtk/follow_ssl.c
index cd99a4565d..f9daa2f125 100644
--- a/gtk/follow_ssl.c
+++ b/gtk/follow_ssl.c
@@ -189,8 +189,8 @@ follow_ssl_stream_cb(GtkWidget * w, gpointer data _U_)
/* allocate our new filter. API claims g_malloc terminates program on failure */
/* my calc for max alloc needed is really +10 but when did a few extra bytes hurt ? */
- previous_filter_len = previous_filter?strlen(previous_filter):0;
- filter_out_filter_len = strlen(follow_filter) + previous_filter_len + 16;
+ previous_filter_len = previous_filter?(int)strlen(previous_filter):0;
+ filter_out_filter_len = (int)strlen(follow_filter) + previous_filter_len + 16;
follow_info->filter_out_filter = (gchar *)g_malloc(filter_out_filter_len);
/* append the negation */
@@ -336,7 +336,7 @@ follow_read_ssl_stream(follow_info_t *follow_info,
if (!skip) {
size_t nchars = rec->data.data_len;
- gchar *buffer = g_memdup(rec->data.data, nchars);
+ gchar *buffer = g_memdup(rec->data.data, (guint) nchars);
frs_return = follow_show(follow_info, print_line, buffer, nchars,
rec->is_server, arg, global_pos,
diff --git a/gtk/follow_stream.c b/gtk/follow_stream.c
index 9ca15a8ade..a7b8c154b8 100644
--- a/gtk/follow_stream.c
+++ b/gtk/follow_stream.c
@@ -120,10 +120,10 @@ follow_add_to_gtk_text(char *buffer, size_t nchars, gboolean is_server,
gtk_text_buffer_get_end_iter(buf, &iter);
if (is_server) {
- gtk_text_buffer_insert_with_tags(buf, &iter, buffer, nchars,
+ gtk_text_buffer_insert_with_tags(buf, &iter, buffer, (gint) nchars,
server_tag, NULL);
} else {
- gtk_text_buffer_insert_with_tags(buf, &iter, buffer, nchars,
+ gtk_text_buffer_insert_with_tags(buf, &iter, buffer, (gint) nchars,
client_tag, NULL);
}
return TRUE;
@@ -953,7 +953,7 @@ follow_show(follow_info_t *follow_info,
case SHOW_EBCDIC:
/* If our native arch is ASCII, call: */
- EBCDIC_to_ASCII(buffer, nchars);
+ EBCDIC_to_ASCII(buffer, (guint) nchars);
if (!(*print_line) (buffer, nchars, is_server, arg))
return FRS_PRINT_ERROR;
break;
diff --git a/gtk/follow_tcp.c b/gtk/follow_tcp.c
index ef22411ecf..df1854c8d5 100644
--- a/gtk/follow_tcp.c
+++ b/gtk/follow_tcp.c
@@ -174,7 +174,7 @@ follow_tcp_stream_cb(GtkWidget * w, gpointer data _U_)
/* allocate our new filter. API claims g_malloc terminates program on failure */
/* my calc for max alloc needed is really +10 but when did a few extra bytes hurt ? */
- filter_out_filter_len = strlen(follow_filter) + strlen(previous_filter) + 16;
+ filter_out_filter_len = (int)(strlen(follow_filter) + strlen(previous_filter) + 16);
follow_info->filter_out_filter = (gchar *)g_malloc(filter_out_filter_len);
/* append the negation */
@@ -392,7 +392,7 @@ follow_read_tcp_stream(follow_info_t *follow_info,
if (nchars == 0)
break;
/* XXX - if we don't get "bcount" bytes, is that an error? */
- sc.dlen -= nchars;
+ sc.dlen -= (guint32) nchars;
if (!skip) {
frs_return = follow_show(follow_info, print_line, buffer,
diff --git a/gtk/follow_udp.c b/gtk/follow_udp.c
index 63462ee7f6..10ac3d5705 100644
--- a/gtk/follow_udp.c
+++ b/gtk/follow_udp.c
@@ -136,8 +136,8 @@ follow_udp_stream_cb(GtkWidget *w, gpointer data _U_)
/* allocate our new filter. API claims g_malloc terminates program on failure */
/* my calc for max alloc needed is really +10 but when did a few extra bytes hurt ? */
- previous_filter_len = previous_filter?strlen(previous_filter):0;
- filter_out_filter_len = strlen(follow_filter) + previous_filter_len + 16;
+ previous_filter_len = previous_filter?(int)strlen(previous_filter):0;
+ filter_out_filter_len = (int)strlen(follow_filter) + previous_filter_len + 16;
follow_info->filter_out_filter = (gchar *)g_malloc(filter_out_filter_len);
/* append the negation */
diff --git a/gtk/graph_analysis.c b/gtk/graph_analysis.c
index a427a16908..eaf81915f3 100644
--- a/gtk/graph_analysis.c
+++ b/gtk/graph_analysis.c
@@ -204,7 +204,7 @@ static void draw_arrow(GdkDrawable *pixmap, GdkGC *gc, gint x, gint y, gboolean
static void enlarge_string(GString *gstr, guint32 length, char pad){
- guint32 i;
+ gsize i;
for (i = gstr->len; i < length; i++){
g_string_append_c(gstr, pad);
@@ -219,7 +219,7 @@ static void enlarge_string(GString *gstr, guint32 length, char pad){
static void overwrite (GString *gstr, char *text_to_insert, guint32 p1, guint32 p2){
- guint32 len;
+ gsize len;
gsize pos;
if (p1 == p2)
@@ -238,12 +238,11 @@ static void overwrite (GString *gstr, char *text_to_insert, guint32 p1, guint32
len = strlen(text_to_insert);
}
- /* ouch this is ugly but gtk1 needs it */
- if ((guint32)pos > (guint32)gstr->len)
+ if (pos > gstr->len)
pos = gstr->len;
/* ouch this is ugly but gtk1 needs it */
- if ((guint32)(pos + len) > (guint32)gstr->len)
+ if ((pos + len) > gstr->len)
g_string_truncate(gstr, pos);
else
g_string_erase(gstr, pos, len);
@@ -376,7 +375,7 @@ static gboolean dialog_graph_dump_to_file(graph_analysis_data_t* user_data)
g_string_append_c(empty_line, '|');
- enlarge_string(separator_line, empty_line->len + header_length, '-');
+ enlarge_string(separator_line, (guint32) empty_line->len + header_length, '-');
/*
* Draw the items
diff --git a/gtk/main.c b/gtk/main.c
index 90c8ffdd2d..cffb210069 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -697,9 +697,9 @@ tree_view_selection_changed_cb(GtkTreeSelection *sel, gpointer user_data _U_)
if (finfo->hfinfo->blurb != NULL &&
finfo->hfinfo->blurb[0] != '\0') {
has_blurb = TRUE;
- length = strlen(finfo->hfinfo->blurb);
+ length = (guint) strlen(finfo->hfinfo->blurb);
} else {
- length = strlen(finfo->hfinfo->name);
+ length = (guint) strlen(finfo->hfinfo->name);
}
finfo_length = finfo->length + finfo->appendix_length;
diff --git a/gtk/prefs_gui.c b/gtk/prefs_gui.c
index 42e01ae558..c26c8ae94e 100644
--- a/gtk/prefs_gui.c
+++ b/gtk/prefs_gui.c
@@ -600,7 +600,7 @@ fileopen_dir_changed_cb(GtkWidget *fileopen_entry _U_, GdkEvent *event _U_, gpoi
gint fileopen_dir_te_length;
fileopen_dir_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w), GUI_FILEOPEN_DIR_KEY);
- fileopen_dir_te_length = strlen(gtk_entry_get_text (GTK_ENTRY(fileopen_entry)));
+ fileopen_dir_te_length = (gint) strlen(gtk_entry_get_text (GTK_ENTRY(fileopen_entry)));
if (fileopen_dir_te_length == 0)
return FALSE;
lastchar = gtk_editable_get_chars(GTK_EDITABLE(fileopen_entry), fileopen_dir_te_length-1, -1);
diff --git a/gtk/recent.c b/gtk/recent.c
index a57f0e06dc..917fb29bb5 100644
--- a/gtk/recent.c
+++ b/gtk/recent.c
@@ -518,7 +518,7 @@ read_set_recent_pair_static(gchar *key, gchar *value, void *private_data _U_)
GList *col_l, *col_l_elt;
col_width_data *cfmt;
const gchar *cust_format = col_format_to_string(COL_CUSTOM);
- int cust_format_len = strlen(cust_format);
+ int cust_format_len = (int) strlen(cust_format);
if (strcmp(key, RECENT_KEY_MAIN_TOOLBAR_SHOW) == 0) {
if (g_ascii_strcasecmp(value, "true") == 0) {