diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-28 21:55:11 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-28 21:55:11 +0000 |
commit | 8fd3ee05600dd7d0e6434e7eb824932c52000ce3 (patch) | |
tree | dc1df6288600e883ed53ac7e43a38a2d03abb9f3 /gtk | |
parent | 32780e71e8ce8c8fd1898cbcb62f6bc8a59341f3 (diff) |
Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.
svn path=/trunk/; revision=21253
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/find_dlg.c | 4 | ||||
-rw-r--r-- | gtk/follow_dlg.c | 2 | ||||
-rw-r--r-- | gtk/proto_draw.c | 20 | ||||
-rw-r--r-- | gtk/recent.c | 4 | ||||
-rw-r--r-- | gtk/stats_tree_stat.c | 12 |
5 files changed, 21 insertions, 21 deletions
diff --git a/gtk/find_dlg.c b/gtk/find_dlg.c index c4becfd534..53eb2a759d 100644 --- a/gtk/find_dlg.c +++ b/gtk/find_dlg.c @@ -677,7 +677,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) } else { /* The raw packet data */ if(string){ - found_packet = cf_find_packet_data(&cfile, (guint8*)string, strlen(string)); + found_packet = cf_find_packet_data(&cfile, string, strlen(string)); g_free(string); } if (!found_packet) { @@ -751,7 +751,7 @@ find_previous_next(GtkWidget *w, gpointer d, gboolean sens) cf_find_packet_summary_line(&cfile, string); } else { /* The raw packet data */ - cf_find_packet_data(&cfile, (guint8*)string, strlen(string)); + cf_find_packet_data(&cfile, string, strlen(string)); } g_free(string); } else { diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c index 343c578a2d..2ca7e6ff7b 100644 --- a/gtk/follow_dlg.c +++ b/gtk/follow_dlg.c @@ -694,7 +694,7 @@ follow_read_stream(follow_info_t *follow_info, case SHOW_EBCDIC: /* If our native arch is ASCII, call: */ - EBCDIC_to_ASCII((guint8*)buffer, nchars); + EBCDIC_to_ASCII(buffer, nchars); if (!(*print_line) (buffer, nchars, is_server, arg)) goto print_error; break; diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c index ecd3be31b4..6840fb6e24 100644 --- a/gtk/proto_draw.c +++ b/gtk/proto_draw.c @@ -1458,7 +1458,7 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, else revstyle = "bold"; - gtk_text_buffer_insert_with_tags_by_name(buf, &iter, (gchar*)line, -1, + gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, -1, "plain", NULL); /* Do we start in reverse? */ reverse = i >= bstart && i < bend; @@ -1477,7 +1477,7 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, newreverse = i >= bstart && i < bend; /* Have we gone from reverse to plain? */ if (reverse && (reverse != newreverse)) { - gtk_text_buffer_insert_with_tags_by_name(buf, &iter, (gchar*)line, cur, + gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, cur, revstyle, NULL); cur = 0; } @@ -1491,7 +1491,7 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, } /* Have we gone from plain to reversed? */ if (!reverse && (reverse != newreverse)) { - gtk_text_buffer_insert_with_tags_by_name(buf, &iter, (gchar*)line, cur, + gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, cur, "plain", NULL); mark = gtk_text_buffer_create_mark(buf, NULL, &iter, TRUE); cur = 0; @@ -1499,13 +1499,13 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, reverse = newreverse; } /* Print remaining part of line */ - gtk_text_buffer_insert_with_tags_by_name(buf, &iter, (gchar*)line, cur, + gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, cur, reverse ? revstyle : "plain", NULL); cur = 0; /* Print some space at the end of the line */ line[cur++] = ' '; line[cur++] = ' '; line[cur++] = ' '; - gtk_text_buffer_insert_with_tags_by_name(buf, &iter, (gchar*)line, cur, + gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, cur, "plain", NULL); cur = 0; @@ -1532,7 +1532,7 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, newreverse = i >= bstart && i < bend; /* Have we gone from reverse to plain? */ if (reverse && (reverse != newreverse)) { - convline = g_locale_to_utf8((gchar*)line, cur, NULL, &newsize, NULL); + convline = g_locale_to_utf8(line, cur, NULL, &newsize, NULL); gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize, revstyle, NULL); g_free( (gpointer) convline); @@ -1546,7 +1546,7 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, } /* Have we gone from plain to reversed? */ if (!reverse && (reverse != newreverse)) { - convline = g_locale_to_utf8((gchar*)line, cur, NULL, &newsize, NULL); + convline = g_locale_to_utf8(line, cur, NULL, &newsize, NULL); gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize, "plain", NULL); g_free( (gpointer) convline); @@ -1555,14 +1555,14 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, reverse = newreverse; } /* Print remaining part of line */ - convline = g_locale_to_utf8((gchar*)line, cur, NULL, &newsize, NULL); + convline = g_locale_to_utf8(line, cur, NULL, &newsize, NULL); gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize, reverse ? revstyle : "plain", NULL); g_free( (gpointer) convline); cur = 0; line[cur++] = '\n'; - gtk_text_buffer_insert_with_tags_by_name(buf, &iter, (gchar*)line, cur, + gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, cur, "plain", NULL); #endif } @@ -1993,7 +1993,7 @@ tree_view_follow_link(field_info *fi) cf_goto_frame(&cfile, fi->value.value.uinteger); } if(FI_GET_FLAG(fi, FI_URL) && IS_FT_STRING(fi->hfinfo->type)) { - url = g_strndup((gchar*)tvb_get_ptr(fi->ds_tvb, fi->start, fi->length), fi->length); + url = g_strndup(tvb_get_ptr(fi->ds_tvb, fi->start, fi->length), fi->length); browser_open_url(url); g_free(url); } diff --git a/gtk/recent.c b/gtk/recent.c index 95c81379a8..929c65558b 100644 --- a/gtk/recent.c +++ b/gtk/recent.c @@ -489,7 +489,7 @@ recent_set_arg(char *prefarg) guchar *p, *colonp; int ret; - colonp = (guchar*)strchr(prefarg, ':'); + colonp = strchr(prefarg, ':'); if (colonp == NULL) return PREFS_SET_SYNTAX_ERR; @@ -513,7 +513,7 @@ recent_set_arg(char *prefarg) return PREFS_SET_SYNTAX_ERR; } - ret = read_set_recent_pair_static(prefarg, (gchar*)p, NULL); + ret = read_set_recent_pair_static(prefarg, p, NULL); *colonp = ':'; /* put the colon back */ return ret; } diff --git a/gtk/stats_tree_stat.c b/gtk/stats_tree_stat.c index a9b5340e40..e2caf8c9d3 100644 --- a/gtk/stats_tree_stat.c +++ b/gtk/stats_tree_stat.c @@ -131,8 +131,8 @@ static void draw_gtk_node(stat_node* node) { static gchar percent[NUM_BUF_SIZE]; stat_node* child; - stats_tree_get_strs_from_node(node, (guint8*)value, (guint8*)rate, - (guint8*)percent); + stats_tree_get_strs_from_node(node, value, rate, + percent); #if GTK_MAJOR_VERSION >= 2 if (node->st->pr->store && node->pr->iter) { @@ -230,7 +230,7 @@ static void reset_tap(void* p) { /* initializes the stats_tree window */ static void init_gtk_tree(const char* optarg, void *userdata _U_) { - guint8* abbr = stats_tree_get_abbr((guint8*)optarg); + guint8* abbr = stats_tree_get_abbr(optarg); stats_tree* st = NULL; stats_tree_cfg* cfg = NULL; tree_pres* pr = g_malloc(sizeof(tree_pres)); @@ -269,7 +269,7 @@ static void init_gtk_tree(const char* optarg, void *userdata _U_) { if (init_strlen == strlen(optarg)) { st = stats_tree_new(cfg,pr,NULL); } else { - st = stats_tree_new(cfg,pr,((gchar*)optarg)+init_strlen+1); + st = stats_tree_new(cfg,pr,(char*)optarg+init_strlen+1); } } else { @@ -371,7 +371,7 @@ static void init_gtk_tree(const char* optarg, void *userdata _U_) { gtk_container_add( GTK_CONTAINER(main_vb), scr_win); - error_string = register_tap_listener( (char*)cfg->tapname, + error_string = register_tap_listener( cfg->tapname, st, st->filter, reset_tap, @@ -419,7 +419,7 @@ static void register_gtk_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p cfg->pr->stat_dlg->tap_init_cb = init_gtk_tree; cfg->pr->stat_dlg->index = -1; - register_dfilter_stat(cfg->pr->stat_dlg, (char*)cfg->name, + register_dfilter_stat(cfg->pr->stat_dlg, cfg->name, REGISTER_STAT_GROUP_NONE); } |