aboutsummaryrefslogtreecommitdiffstats
path: root/epan/reedsolomon.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-07-24 08:53:39 -0400
committerAnders Broman <a.broman58@gmail.com>2016-07-25 04:26:50 +0000
commit1da1f945e2988080add4923dc2021753e3b2f7c1 (patch)
tree2839b66064e34ba99a6d031778330f20497b5e93 /epan/reedsolomon.c
parentee7f9c33f63532bc69899a0750177756be53c0c1 (diff)
downloadwireshark-1da1f945e2988080add4923dc2021753e3b2f7c1.tar.gz
wireshark-1da1f945e2988080add4923dc2021753e3b2f7c1.tar.bz2
wireshark-1da1f945e2988080add4923dc2021753e3b2f7c1.zip
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/reedsolomon.c')
-rw-r--r--epan/reedsolomon.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/reedsolomon.c b/epan/reedsolomon.c
index a11bd52a28..c47ba4cbe9 100644
--- a/epan/reedsolomon.c
+++ b/epan/reedsolomon.c
@@ -30,6 +30,7 @@
*/
#include <stdio.h>
#include "reedsolomon.h"
+#include <wsutil/ws_printf.h> /* ws_debug_printf */
#ifdef CCSDS
/* CCSDS field generator polynomial: 1+x+x^2+x^7+x^8 */
@@ -510,15 +511,15 @@ eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras)
count++;
}
if (count != no_eras) {
- printf("\n lambda(x) is WRONG\n");
+ ws_debug_printf("\n lambda(x) is WRONG\n");
count = -1;
goto finish;
}
#if DEBUG >= 2
- printf("\n Erasure positions as determined by roots of Eras Loc Poly:\n");
+ ws_debug_printf("\n Erasure positions as determined by roots of Eras Loc Poly:\n");
for (i = 0; i < count; i++)
- printf("%d ", loc[i]);
- printf("\n");
+ ws_debug_printf("%d ", loc[i]);
+ ws_debug_printf("\n");
#endif
#endif
}