Scan build: Result of operation is garbage or undefined
This commit is contained in:
@@ -214,10 +214,6 @@ void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
#define cmax(a,b) ((a>b) ? (a) : (b))
|
||||
#define cmax3(a,b,c) ((cmax(a,b)>c) ? (cmax(a,b)) : (c))
|
||||
#define cmin(a,b) ((a<b) ? (a) : (b))
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef min
|
||||
#undef min
|
||||
|
||||
+15
-3
@@ -19,9 +19,21 @@ extern "C" {
|
||||
|
||||
#define sizeofArray(a) (sizeof(a)/sizeof(*(a)))
|
||||
|
||||
#define cmax(a,b) ((a>b) ? (a) : (b))
|
||||
#define cmax3(a,b,c) ((cmax(a,b)>c) ? (cmax(a,b)) : (c))
|
||||
#define cmin(a,b) ((a<b) ? (a) : (b))
|
||||
// Prevent double evaluation in max macro
|
||||
#define cmax(a,b) ({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a > _b ? _a : _b; })
|
||||
|
||||
|
||||
#define cmax3(a,b,c) ( cmax(cmax(a,b), cmax(b,c)) )
|
||||
|
||||
// Prevent double evaluation in min macro
|
||||
#define cmin(a,b) ({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a < _b ? _a : _b; })
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef min
|
||||
|
||||
Reference in New Issue
Block a user