From 907d49483d24698013fcdaec15b78a149751eecb Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 25 Jul 2016 22:58:09 -0400 Subject: Fix some of the checkAPIs.pl warnings for g_warning. 1. Create ws_g_warning for legitimate uses of g_warning 2. Use proto_tree_add_debug_text 3. Comment some out Change-Id: Ida044bf40286b955fdd529c4f9907c8e09b3d7c5 Reviewed-on: https://code.wireshark.org/review/16678 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- plugins/mate/mate_util.c | 5 +++-- plugins/mate/packet-mate.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins/mate') diff --git a/plugins/mate/mate_util.c b/plugins/mate/mate_util.c index 828e1ac118..70f2d80a6b 100644 --- a/plugins/mate/mate_util.c +++ b/plugins/mate/mate_util.c @@ -26,6 +26,7 @@ #include "mate.h" #include "mate_util.h" #include +#include /* ws_g_warning */ /*************************************************************************** * ADDRDIFF @@ -145,7 +146,7 @@ gchar* scs_subscribe(SCS_collection* c, const gchar* s) { len = SCS_HUGE_SIZE; } else { len = SCS_HUGE_SIZE; - g_warning("mate SCS: string truncated due to huge size"); + ws_g_warning("mate SCS: string truncated due to huge size"); } orig = (gchar *)g_slice_alloc(len); @@ -195,7 +196,7 @@ void scs_unsubscribe(SCS_collection* c, gchar* s) { (*ip)--; } } else { - g_warning("unsubscribe: not subscribed"); + ws_g_warning("unsubscribe: not subscribed"); } } diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c index 5ece48b188..81efe83e62 100644 --- a/plugins/mate/packet-mate.c +++ b/plugins/mate/packet-mate.c @@ -30,6 +30,7 @@ #include "mate.h" #include +#include /* ws_g_warning */ void proto_register_mate(void); void proto_reg_handoff_mate(void); @@ -354,7 +355,7 @@ proto_reg_handoff_mate(void) (tap_draw_cb) NULL); if ( tap_error ) { - g_warning("mate: couldn't (re)register tap: %s",tap_error->str); + ws_g_warning("mate: couldn't (re)register tap: %s",tap_error->str); g_string_free(tap_error, TRUE); mate_tap_data = 0; return; -- cgit v1.2.1