aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-02-25 12:09:01 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-02-27 18:53:45 +0100
commitda46fdac36058e97e5a3131e2c51d162f4c619e9 (patch)
tree11a94bdc19b81b57e6026d962a1eca4a013ded2c /tap.c
parent834b9a30491b0211f59b4e0ac2a79910665f8e0d (diff)
downloadpasst-da46fdac36058e97e5a3131e2c51d162f4c619e9.tar
passt-da46fdac36058e97e5a3131e2c51d162f4c619e9.tar.gz
passt-da46fdac36058e97e5a3131e2c51d162f4c619e9.tar.bz2
passt-da46fdac36058e97e5a3131e2c51d162f4c619e9.tar.lz
passt-da46fdac36058e97e5a3131e2c51d162f4c619e9.tar.xz
passt-da46fdac36058e97e5a3131e2c51d162f4c619e9.tar.zst
passt-da46fdac36058e97e5a3131e2c51d162f4c619e9.zip
tcp: Suppress knownConditionTrueFalse cppcheck false positive
cppcheck 2.10 reports: tcp.c:1815:12: style: Condition 'wnd>prev_scaled' is always false [knownConditionTrueFalse] if ((wnd > prev_scaled && wnd * 99 / 100 < prev_scaled) || ^ tcp.c:1808:8: note: Assignment 'wnd=((1<<(16+8))<(wnd))?(1<<(16+8)):(wnd)', assigned value is less than 1 wnd = MIN(MAX_WINDOW, wnd); ^ tcp.c:1811:19: note: Assuming condition is false if (prev_scaled == wnd) ^ tcp.c:1815:12: note: Condition 'wnd>prev_scaled' is always false if ((wnd > prev_scaled && wnd * 99 / 100 < prev_scaled) || ^ but this is not actually the case: wnd is typically greater than 1, and might very well be greater than prev_scaled as well. I bisected this down to cppcheck commit b4d455df487c ("Fix 11349: FP negativeIndex for clamped array index (#4627)") and reported findings at https://github.com/danmar/cppcheck/pull/4627. Suppress the warning for the moment being. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tap.c')
0 files changed, 0 insertions, 0 deletions