From 7397c3cd9b284f49a786ca0661c485fde90d71c0 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Mon, 21 Mar 2016 17:15:51 +0000 Subject: [PATCH] Fix build warnings about ternary operator precedence Be more explicit with parenthesis to avoid any possibly confusion about operator precendence. Signed-off-by: Colin Ian King --- src/fsk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fsk.c b/src/fsk.c index 1eac0e8..f8a7e44 100644 --- a/src/fsk.c +++ b/src/fsk.c @@ -474,7 +474,7 @@ fsk_find_frame( fsk_plan *fskp, float *samples, unsigned int frame_nsamples, int j; for ( j=0; ; j++ ) { - int up = j%2 ? 1 : -1; + int up = ( j % 2 ) ? 1 : -1; int t = try_first_sample + up*((j+1)/2)*try_step_nsamples; if ( t >= (int)try_max_nsamples ) break; @@ -525,7 +525,7 @@ fsk_find_frame( fsk_plan *fskp, float *samples, unsigned int frame_nsamples, debug_log("FSK_FRAME bits='"); for ( j=0; j> j ) & 1 ? '1' : '0' ); + debug_log("%c", ( ( *bits_outp >> j ) & 1 ) ? '1' : '0' ); debug_log("' datum='%c' (0x%02x) c=%f a=%f t=%d\n", isprint(bitchar)||isspace(bitchar) ? bitchar : '.', bitchar,