Mercurial > octave
changeset 26471:5becd46b75f8 stable
mx-inlines.cc: Fix static analyzer detected issues (bug #55347).
* mx-inlines.cc (OP_RED_SUMSQ): Put parentheses around every expansion of "el"
in macro.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 06 Jan 2019 13:19:48 -0800 |
parents | 83857449f3da |
children | 86bcab2e371e |
files | liboctave/operators/mx-inlines.cc |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/operators/mx-inlines.cc Sun Jan 06 21:38:41 2019 +0100 +++ b/liboctave/operators/mx-inlines.cc Sun Jan 06 13:19:48 2019 -0800 @@ -672,7 +672,7 @@ #define OP_RED_SUM(ac, el) ac += el #define OP_RED_PROD(ac, el) ac *= el -#define OP_RED_SUMSQ(ac, el) ac += (el*el) +#define OP_RED_SUMSQ(ac, el) ac += ((el)*(el)) #define OP_RED_SUMSQC(ac, el) ac += cabsq (el) inline void