From 1da1f945e2988080add4923dc2021753e3b2f7c1 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 24 Jul 2016 08:53:39 -0400 Subject: Fix checkAPI.pl warnings about printf Many of the complaints from checkAPI.pl for use of printf are when its embedded in an #ifdef and checkAPI isn't smart enough to figure that out. The other (non-ifdef) use is dumping internal structures (which is a type of debug functionality) Add a "ws_debug_printf" macro for printf to pacify the warnings. Change-Id: I63610e1adbbaf2feffb4ec9d4f817247d833f7fd Reviewed-on: https://code.wireshark.org/review/16623 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/asn1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'epan/asn1.c') diff --git a/epan/asn1.c b/epan/asn1.c index c2f718d732..6581e42da7 100644 --- a/epan/asn1.c +++ b/epan/asn1.c @@ -30,6 +30,7 @@ #include #ifdef DEBUG #include +#include /* ws_debug_printf */ #endif #include @@ -272,7 +273,7 @@ double asn1_get_real(const guint8 *real_ptr, gint len) { } val = (double) S * N * pow(2, F) * pow(B, E); #ifdef DEBUG - printf("S = %d, N = %lu, F = %u, B = %u, E = %d -> %f\n", S, N, F, B, E, val); + ws_debug_printf("S = %d, N = %lu, F = %u, B = %u, E = %d -> %f\n", S, N, F, B, E, val); #endif } else if (octet & 0x40) { /* SpecialRealValue */ switch (octet & 0x3F) { -- cgit v1.2.3