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/column.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/column.c')
-rw-r--r-- | epan/column.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/column.c b/epan/column.c index 709ab6bc64..1f7b2fa518 100644 --- a/epan/column.c +++ b/epan/column.c @@ -35,6 +35,7 @@ #include <epan/dfilter/dfilter.h> #include <epan/column.h> #include <epan/packet.h> +#include <wsutil/ws_printf.h> /* ws_debug_printf */ /* Given a format number (as defined in column-utils.h), returns its equivalent string */ @@ -183,10 +184,10 @@ column_dump_column_formats(void) gint fmt; for (fmt = 0; fmt < NUM_COL_FMTS; fmt++) { - printf("%s\t%s\n", col_format_to_string(fmt), col_format_desc(fmt)); + ws_debug_printf("%s\t%s\n", col_format_to_string(fmt), col_format_desc(fmt)); } - printf("\nFor example, to print Wireshark's default columns with tshark:\n\n" + ws_debug_printf("\nFor example, to print Wireshark's default columns with tshark:\n\n" #ifdef _WIN32 "tshark.exe -o \"gui.column.format:" "\\\"No.\\\",\\\"%%m\\\"," |