summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-07-25 22:58:09 -0400
committerAnders Broman <a.broman58@gmail.com>2016-07-26 04:08:50 +0000
commit907d49483d24698013fcdaec15b78a149751eecb (patch)
tree001c978c947dd64932fd2d9749cfc46756ac30dc /plugins
parent6fbaf9be34e8745b2781294afdcf2822528a6349 (diff)
downloadwireshark-907d49483d24698013fcdaec15b78a149751eecb.tar.gz
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 <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mate/mate_util.c5
-rw-r--r--plugins/mate/packet-mate.c3
-rw-r--r--plugins/profinet/packet-dcom-cba-acco.c13
3 files changed, 12 insertions, 9 deletions
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 <wsutil/file_util.h>
+#include <wsutil/ws_printf.h> /* 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 <epan/expert.h>
+#include <wsutil/ws_printf.h> /* 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;
diff --git a/plugins/profinet/packet-dcom-cba-acco.c b/plugins/profinet/packet-dcom-cba-acco.c
index 6c49c03a01..b18189dabd 100644
--- a/plugins/profinet/packet-dcom-cba-acco.c
+++ b/plugins/profinet/packet-dcom-cba-acco.c
@@ -32,6 +32,7 @@
#include <epan/dissectors/packet-dcerpc.h>
#include <epan/dissectors/packet-dcom.h>
#include "packet-dcom-cba-acco.h"
+#include <wsutil/ws_printf.h> /* ws_debug_printf */
void proto_register_dcom_cba_acco(void);
void proto_reg_handoff_dcom_cba_acco(void);
@@ -390,7 +391,7 @@ static void
cba_connection_dump(cba_connection_t *conn, const char *role)
{
if (conn->qostype != 0x30) {
- g_warning(" %s#%5u: CID:0x%8x PID:0x%8x PItem:\"%s\" Type:%s QoS:%s/%u Ret:%s Data#%5u-#%5u",
+ ws_debug_printf(" %s#%5u: CID:0x%8x PID:0x%8x PItem:\"%s\" Type:%s QoS:%s/%u Ret:%s Data#%5u-#%5u",
role,
conn->packet_connect,
conn->consid, conn->provid, conn->provitem,
@@ -399,7 +400,7 @@ cba_connection_dump(cba_connection_t *conn, const char *role)
conn->connret==0xffffffff ? "[pending]" : val_to_str(conn->connret, dcom_hresult_vals, "Unknown (0x%08x)"),
conn->packet_first, conn->packet_last);
} else {
- g_warning(" %s#%5u: CID:0x%8x PID:0x%8x PItem:\"%s\" Type:%s QoS:%s/%u Ret:%s Off:%u",
+ ws_debug_printf(" %s#%5u: CID:0x%8x PID:0x%8x PItem:\"%s\" Type:%s QoS:%s/%u Ret:%s Off:%u",
role,
conn->packet_connect,
conn->consid, conn->provid, conn->provitem,
@@ -427,17 +428,17 @@ cba_object_dump(void)
for(pdevs = cba_pdevs; pdevs != NULL; pdevs = g_list_next(pdevs)) {
pdev = pdevs->data;
set_address(&addr, AT_IPv4, 4, pdev->ip);
- g_warning("PDev #%5u: %s IFs:%u", pdev->first_packet, address_to_str(wmem_packet_scope(), &addr),
+ ws_debug_printf("PDev #%5u: %s IFs:%u", pdev->first_packet, address_to_str(wmem_packet_scope(), &addr),
pdev->object ? g_list_length(pdev->object->interfaces) : 0);
for(ldevs = pdev->ldevs; ldevs != NULL; ldevs = g_list_next(ldevs)) {
ldev = ldevs->data;
- g_warning(" LDev#%5u: \"%s\" LDevIFs:%u AccoIFs:%u", ldev->first_packet, ldev->name,
+ ws_debug_printf(" LDev#%5u: \"%s\" LDevIFs:%u AccoIFs:%u", ldev->first_packet, ldev->name,
ldev->ldev_object ? g_list_length(ldev->ldev_object->interfaces) : 0,
ldev->acco_object ? g_list_length(ldev->acco_object->interfaces) : 0);
for(frames = ldev->consframes; frames != NULL; frames = g_list_next(frames)) {
frame = frames->data;
- g_warning(" ConsFrame#%5u: CCRID:0x%x PCRID:0x%x Len:%u Ret:%s Data#%5u-#%5u",
+ ws_debug_printf(" ConsFrame#%5u: CCRID:0x%x PCRID:0x%x Len:%u Ret:%s Data#%5u-#%5u",
frame->packet_connect, frame->conscrid, frame->provcrid, frame->length,
frame->conncrret==0xffffffff ? "[pending]" : val_to_str(frame->conncrret, dcom_hresult_vals, "Unknown (0x%08x)"),
frame->packet_first, frame->packet_last);
@@ -447,7 +448,7 @@ cba_object_dump(void)
}
for(frames = ldev->provframes; frames != NULL; frames = g_list_next(frames)) {
frame = frames->data;
- g_warning(" ProvFrame#%5u: CCRID:0x%x PCRID:0x%x Len:%u Ret:%s Data#%5u-#%5u",
+ ws_debug_printf(" ProvFrame#%5u: CCRID:0x%x PCRID:0x%x Len:%u Ret:%s Data#%5u-#%5u",
frame->packet_connect, frame->conscrid, frame->provcrid, frame->length,
frame->conncrret==0xffffffff ? "[pending]" : val_to_str(frame->conncrret, dcom_hresult_vals, "Unknown (0x%08x)"),
frame->packet_first, frame->packet_last);