Commit 15fd0d9
src: fix node_crypto.cc compiler warnings
Currently the following compiler warnings are issued by clang:
../src/node_crypto.cc:2801:56:
warning: '&&' within '||' [-Wlogical-op-parentheses]
return tag_len == 4 || tag_len == 8 || tag_len >= 12 && tag_len <= 16;
~~ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
../src/node_crypto.cc:2801:56:
note: place parentheses around the '&&' expression to silence this
warning
return tag_len == 4 || tag_len == 8 || tag_len >= 12 && tag_len <= 16;
^
../src/node_crypto.cc:2925:51:
warning: '&&' within '||' [-Wlogical-op-parentheses]
if (cipher->auth_tag_len_ != kNoAuthTagLength &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../src/node_crypto.cc:2925:51:
note: place parentheses around the '&&' expression to silence this
warning
if (cipher->auth_tag_len_ != kNoAuthTagLength &&
^
This commit adds parenthesis around these expressions to silence the
warnings.
PR-URL: #20216
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>1 parent c07c73c commit 15fd0d9
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2798 | 2798 | | |
2799 | 2799 | | |
2800 | 2800 | | |
2801 | | - | |
| 2801 | + | |
2802 | 2802 | | |
2803 | 2803 | | |
2804 | 2804 | | |
| |||
2922 | 2922 | | |
2923 | 2923 | | |
2924 | 2924 | | |
2925 | | - | |
2926 | | - | |
| 2925 | + | |
| 2926 | + | |
2927 | 2927 | | |
2928 | 2928 | | |
2929 | 2929 | | |
| |||
0 commit comments