summaryrefslogtreecommitdiff
path: root/ui/gtk/packet_panes.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-02-13 13:51:05 -0800
committerGerald Combs <gerald@wireshark.org>2015-02-14 19:46:42 +0000
commite11d7ef08fc9b091e317d7cfd2abff1f21ca6276 (patch)
tree16e8747c450db96d68b8c8e0aeda085dfe6d53cf /ui/gtk/packet_panes.c
parent5cc0ad8672180128b32ef9e8f936011429665d88 (diff)
downloadwireshark-e11d7ef08fc9b091e317d7cfd2abff1f21ca6276.tar.gz
Fix diagnostics macros and squelch a gcc warning.
Both clang and gcc define __GNUC__. Make sure we account for that when defining diagnostic macros. Use DIAG_OFF + DIAG_ON to suppress gcc -pedantic warnings about frame_data. Get rid of packet_char_enc casts. Change-Id: Idbcc61bcdb35c1d20f185461c69451dcdf73bae9 Reviewed-on: https://code.wireshark.org/review/7106 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/gtk/packet_panes.c')
-rw-r--r--ui/gtk/packet_panes.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/gtk/packet_panes.c b/ui/gtk/packet_panes.c
index f3fab80f45..b5149b9bad 100644
--- a/ui/gtk/packet_panes.c
+++ b/ui/gtk/packet_panes.c
@@ -843,7 +843,7 @@ packet_hex_update(GtkWidget *bv, const guint8 *pd, int len, int bstart,
int bend, guint64 bmask, int bmask_le,
int astart, int aend,
int pstart, int pend,
- int encoding)
+ packet_char_enc encoding)
{
bytes_view_set_encoding(BYTES_VIEW(bv), encoding);
bytes_view_set_format(BYTES_VIEW(bv), recent.gui_bytes_view);
@@ -1057,7 +1057,8 @@ packet_hex_editor_print(GtkWidget *bv, const guint8 *pd, frame_data *fd, int off
void
packet_hex_reprint(GtkWidget *bv)
{
- int start, end, mask_le, encoding;
+ int start, end, mask_le;
+ packet_char_enc encoding;
int astart, aend;
int pstart, pend;
guint64 mask;
@@ -1075,7 +1076,7 @@ packet_hex_reprint(GtkWidget *bv)
pend = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(bv), E_BYTE_VIEW_PROTO_END_KEY));
data = get_byte_view_data_and_length(bv, &len);
g_assert(data != NULL);
- encoding = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(bv), E_BYTE_VIEW_ENCODE_KEY));
+ encoding = (packet_char_enc) GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(bv), E_BYTE_VIEW_ENCODE_KEY));
/* stig: it should be done only for bitview... */
if (recent.gui_bytes_view != BYTES_BITS)