diff options
author | Michael Mann <mmann78@netscape.net> | 2016-07-24 08:53:39 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-07-25 04:26:50 +0000 |
commit | 1da1f945e2988080add4923dc2021753e3b2f7c1 (patch) | |
tree | 2839b66064e34ba99a6d031778330f20497b5e93 /epan/tvbuff_zlib.c | |
parent | ee7f9c33f63532bc69899a0750177756be53c0c1 (diff) |
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 <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 'epan/tvbuff_zlib.c')
-rw-r--r-- | epan/tvbuff_zlib.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/tvbuff_zlib.c b/epan/tvbuff_zlib.c index e5cb40a6a0..c1a6a1092c 100644 --- a/epan/tvbuff_zlib.c +++ b/epan/tvbuff_zlib.c @@ -33,6 +33,9 @@ #endif #include "tvbuff.h" +#ifdef TVB_Z_DEBUG +#include <wsutil/ws_printf.h> /* ws_debug_printf */ +#endif #ifdef HAVE_ZLIB /* @@ -82,7 +85,7 @@ tvb_uncompress(tvbuff_t *tvb, const int offset, int comprlen) bufsiz = CLAMP(bufsiz, TVB_Z_MIN_BUFSIZ, TVB_Z_MAX_BUFSIZ); #ifdef TVB_Z_DEBUG - printf("bufsiz: %u bytes\n", bufsiz); + ws_debug_printf("bufsiz: %u bytes\n", bufsiz); #endif next = compr; @@ -315,8 +318,8 @@ tvb_uncompress(tvbuff_t *tvb, const int offset, int comprlen) } #ifdef TVB_Z_DEBUG - printf("inflate() total passes: %u\n", inflate_passes); - printf("bytes in: %u\nbytes out: %u\n\n", bytes_in, bytes_out); + ws_debug_printf("inflate() total passes: %u\n", inflate_passes); + ws_debug_printf("bytes in: %u\nbytes out: %u\n\n", bytes_in, bytes_out); #endif if (uncompr != NULL) { |