AI review of 2026-10-22_18-18-58-7a618a46a1f2-results.txt PR: #8819 https://github.com/cppcheck-opensource/cppcheck/pull/8819 Tested: 7a618a46a1f2f0a4b9642de43013200f1d4eaf12 Merge base: 78a38ed5d57dbadcc188ea0204d5c9d1d6b6197c Reviewed: 2026-10-27 13:23:52 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 3852 in the report (random sample), 83 not reviewed: valueFlowMaxIterations Verdicts: 17 improvement, 27 neutral, 6 regression Tokens: 147141 input, 3437145 cache read, 381905 cache write, 18150 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ace/ace_8.0.5+dfsg.orig.tar.gz Result: main ace-8.0.5+dfsg.orig/tests/Compiler_Features_26_Test.cpp:22:20: style: Condition 'a==b' is always false [knownConditionTrueFalse] Explanation: In `!(a!=b) || (a==b)`, the right operand is only evaluated when `a!=b` is true, so `a==b` really is always false there. The warning is a true positive and is still reported. The PR only adds an error path explaining the inference ("Assuming that condition 'a!=b' is not redundant"), which gives users the reason behind the warning. That is slightly more helpful output for the same correct finding. ---- 2 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/alsa-utils/alsa-utils_1.2.16.orig.tar.bz2 Result: main alsa-utils-1.2.16/alsactl/init_parse.c:1236:7: style: Condition '*head' is always true [knownConditionTrueFalse] Explanation: The warning is a true positive in both versions. Inside `while (*head != '\0')`, the `*head == '\\'` branch always ends in `continue` or `break`, so at line 1236 `*head` is non-zero and `if (*head)` is always true. The PR keeps the warning and adds error-path notes, which are accurate: the loop condition at line 1218 and the false `*head == '\\'` branch at line 1219. This explains the finding better, so it is a small improvement in message quality. ---- 3 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/apache2/apache2_2.4.69.orig.tar.gz Result: your httpd-2.4.69/modules/filters/mod_sed.c:286:18: style: Condition 'sed_cfg==NULL' is always false [knownConditionTrueFalse] httpd-2.4.69/modules/filters/mod_sed.c:284:32: note: Assignment 'sed_cfg=&cfg->output', assigned value is never 0 httpd-2.4.69/modules/filters/mod_sed.c:286:18: note: Condition 'sed_cfg==NULL' is always false Explanation: Both main and the PR report the same warning at the same location: `sed_cfg = &cfg->output` can never be NULL, so `sed_cfg==NULL` is always false. This is a true positive in both versions. Only the attached notes or error path differ. The PR's notes (the assignment at line 284, then the condition) are correct, but the main notes are not shown, so there is no clear gain or loss for users. ---- 4 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-gold/binutils-gold_2.44.orig.tar.xz Result: main binutils-gold-2.44/gas/config/tc-h8300.c:1269:5: style: Condition 'Smode' is always true [knownConditionTrueFalse] Explanation: Both main and the PR report the same 'Condition 'Smode' is always true' warning at tc-h8300.c:1269 with identical text and notes. The 'main' line only appears because the output pairing shifted, not because the PR removed the finding. The warning itself looks like a false positive: with Hmode true and Smode false, the ternary reaches the 'Smode ?' check with Smode false. Since it is unchanged by the PR, the result is neutral for users. ---- 5 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-h8300-hms/binutils-h8300-hms_2.16.1.orig.tar.gz Result: main binutils-h8300-hms-2.16.1/bfd/elf32-xtensa.c:6370:11: style: Condition 'irel' is always true [knownConditionTrueFalse] Explanation: The removed 'main' warning (Condition 'irel' is always true) is reported again by the PR at the same location with the same text. The only difference is that the PR version now carries error-path notes (irel = &internal_relocs[i] is never 0). The warning itself is unchanged; the diff entry just reflects the added notes. ---- 6 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dreamchess/dreamchess_0.3.0.orig.tar.gz Result: your dreamchess-dreamchess-ebdc775/dreamchess/src/gui/texture.c:196:6: style: Condition 'texture_image' is always true [knownConditionTrueFalse] dreamchess-dreamchess-ebdc775/dreamchess/src/gui/texture.c:183:21: note: Assuming that condition 'texture_image=IMG_Load(filename)' is not redundant dreamchess-dreamchess-ebdc775/dreamchess/src/gui/texture.c:196:6: note: Condition 'texture_image' is always true Explanation: Both versions report the same true positive. The else branch calls exit(1), so `texture_image` is always non-null at line 196 and the check there is redundant. Only the message changed: the PR adds an error path pointing to the assignment and condition at line 183. That helps show why the value is non-null. The added 'Assuming that condition ... is not redundant' wording is a bit odd, since nothing needs to be assumed here. Overall the finding and its usefulness are essentially unchanged. ---- 7 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/drogon/drogon_1.9.13+ds.orig.tar.xz Result: main drogonframework-drogon-4c54307/lib/src/HttpServer.cc:882:13: style: Condition 'cbParams' is always true [knownConditionTrueFalse] Explanation: The warning itself is unchanged and correct: line 876 returns early when `!cbParams`, so `cbParams` at line 882 is always true. It shows up as a main/your pair only because the PR added a note chain to the error path ('Assuming that condition !cbParams is not redundant', 'Assuming condition is true'). That note at 876:9 points to the early return that makes the condition redundant. The extra explanation helps users understand the warning, so the message became more informative. ---- 8 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.28.1.orig.tar.xz Result: your efl-1.28.1/src/lib/evas/canvas/evas_object_textgrid.c:950:33: style: Condition 'font_source' is always true [knownConditionTrueFalse] efl-1.28.1/src/lib/evas/canvas/evas_object_textgrid.c:947:9: note: Assuming that condition '!font_source' is not redundant efl-1.28.1/src/lib/evas/canvas/evas_object_textgrid.c:950:33: note: Condition 'font_source' is always true Explanation: This warning shows up as both a 'main' and a 'your' line, so it is reported by both versions. Only the attached notes changed. The warning is a true positive: line 947 returns when font_source is NULL, so 'font_source' at line 950 is always true. The message text is identical and the notes are essentially the same, so users see no meaningful difference. ---- 9 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/evince/evince_49~alpha.1.orig.tar.xz Result: main evince-49.alpha.1/shell/ev-sidebar-thumbnails.c:1271:33: style: Condition 'is_two_columns' is always true [knownConditionTrueFalse] Explanation: The same knownConditionTrueFalse warning at line 1271 is reported by both main and your. Only the supporting notes differ: your version adds the error path pointing at line 1268. At line 1271, 'is_two_columns' is inside 'if (resize_sidebar && is_two_columns)', so it really is always true, and the warning is a true positive in both versions. The added note makes the explanation slightly more helpful, but the reported issue is unchanged, so the effect on users is effectively neutral. ---- 10 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/geany-plugins/geany-plugins_2.1+dfsg.orig.tar.xz Result: your geany-plugins-2.1/spellcheck/src/speller.c:190:14: style: Condition 'suggs!=NULL' is always true [knownConditionTrueFalse] geany-plugins-2.1/spellcheck/src/speller.c:175:13: note: Assuming that condition 'suggs!=NULL' is not redundant geany-plugins-2.1/spellcheck/src/speller.c:190:14: note: Condition 'suggs!=NULL' is always true Explanation: The warning is reported by both main and your. The only difference is how the output is printed: main shows a single line, and your adds the supporting notes. The text and location are unchanged. The warning itself is correct: `suggs != NULL` at line 190 sits inside the `if (suggs != NULL)` block opened at line 175, and `suggs` is not modified in between, so it is always true. ---- 11 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnome-shell/gnome-shell_51.0.orig.tar.xz Result: your gnome-shell-51.0/src/st/croco/cr-statement.c:877:45: style: Condition 'crstr' is always true [knownConditionTrueFalse] gnome-shell-51.0/src/st/croco/cr-statement.c:870:40: note: Assuming that condition 'cur->data' is not redundant gnome-shell-51.0/src/st/croco/cr-statement.c:871:63: note: crstr is assigned 'cur->data' here. gnome-shell-51.0/src/st/croco/cr-statement.c:877:45: note: Condition 'crstr' is always true Explanation: The same warning is reported by both main and the PR at the same location. In the code, `crstr` is assigned from `cur->data` inside `if (cur->data)`, so the check `if (crstr && ...)` is genuinely always true; the warning is a true positive both before and after. The diff shows a main/your pair, so something in the message (probably the note path) changed slightly. The shown notes are accurate and nothing meaningful changed for users. ---- 12 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/goffice/goffice_0.10.57.orig.tar.xz Result: your goffice-0.10.57/goffice/math/go-ryu.c:1141:34: warning: Expression '-e2' can have a negative value. That is converted to an unsigned value and used in an unsigned calculation. [signConversionCond] goffice-0.10.57/goffice/math/go-ryu.c:1134:10: note: Assuming that condition 'e2<-52' is not redundant goffice-0.10.57/goffice/math/go-ryu.c:1141:34: note: Negative value is converted to an unsigned value Explanation: The PR adds a new false positive. At line 1141, `e2` is limited to [-52, 0] by the two early returns (`e2 > 0` and `e2 < -52`), so `-e2` is in [0, 52] and can never be negative. The cited condition `e2 < -52` makes `-e2` larger, not negative, and that branch returns anyway. The signConversionCond warning on `1ull << -e2` is therefore wrong. ---- 13 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/grub/grub_0.97.orig.tar.gz Result: main grub-0.97/stage2/common.c:223:14: error: Uninitialized variable: memtmp [legacyUninitvar] Explanation: At line 221, `memtmp` is assigned inside the condition `(memtmp = get_eisamemsize ()) != -1`, and that happens before the branch body runs. So `memtmp` is always initialized when line 223 reads it. The legacyUninitvar warning was a false positive, and the pull request removed it. ---- 14 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/isc-kea/isc-kea_3.0.4.orig.tar.xz Result: your kea-3.0.4/src/hooks/dhcp/ddns_tuning/tests/ddns_tuning_unittests.cc:109:30: warning:inconclusive: Either the condition 'index>test_subnets_.size()' is redundant or size of 'test_subnets_' can be -1. Expression 'test_subnets_[index]' causes access out of bounds. [containerOutOfBounds] kea-3.0.4/src/hooks/dhcp/ddns_tuning/tests/ddns_tuning_unittests.cc:508:76: note: Calling function 'getSubnet', 1st argument '0' value is 0 kea-3.0.4/src/hooks/dhcp/ddns_tuning/tests/ddns_tuning_unittests.cc:105:19: note: Assuming condition is false kea-3.0.4/src/hooks/dhcp/ddns_tuning/tests/ddns_tuning_unittests.cc:109:30: note: Access out of bounds Explanation: `getSubnet` checks `index > test_subnets_.size()` instead of `>=`, so `index == size()` gets through to `test_subnets_[index]`. The underlying off-by-one is real. Main's message tied this to a concrete call (`getSubnet(3)`) and a container size of 2. The PR's message instead claims the size of `test_subnets_` can be -1, which is impossible for a container. This looks like a value-flow artifact, probably from treating unsigned or size values as signed. The PR keeps the warning but makes it nonsensical and less useful, so it is a regression in message accuracy. ---- 15 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/isc-kea/isc-kea_3.0.4.orig.tar.xz Result: your kea-3.0.4/src/lib/yang/adaptor.cc:72:17: style: Condition 'param' is always true [knownConditionTrueFalse] kea-3.0.4/src/lib/yang/adaptor.cc:70:19: note: Assuming that condition 'param' is not redundant kea-3.0.4/src/lib/yang/adaptor.cc:71:54: note: Assuming container is not empty kea-3.0.4/src/lib/yang/adaptor.cc:72:17: note: Condition 'param' is always true Explanation: Line 70 checks `!first && param`. Inside that block, `param` is never modified, so the check of `param` at line 72 is indeed always true. Main and the PR both report the same true positive. The only difference is that the PR now adds the error path notes: the condition at line 70 and the non-empty container at line 71. These notes explain why the condition is always true, so the message is more informative and no less accurate. ---- 16 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/k/kf6-ktextwidgets/kf6-ktextwidgets_6.30.0.orig.tar.xz Result: your ktextwidgets-6.30.0/src/findreplace/kfinddialog.cpp:516:13: style: Condition 'regExpAction' is always true [knownConditionTrueFalse] ktextwidgets-6.30.0/src/findreplace/kfinddialog.cpp:514:9: note: Assuming that condition 'action' is not redundant ktextwidgets-6.30.0/src/findreplace/kfinddialog.cpp:515:65: note: Assignment 'regExpAction=static_cast(action)', assigned value is never 0 ktextwidgets-6.30.0/src/findreplace/kfinddialog.cpp:516:13: note: Condition 'regExpAction' is always true Explanation: Both main and the PR report the same `knownConditionTrueFalse` warning at 516:13. It is a true positive: inside `if (action)`, `static_cast(action)` cannot be null, so `if (regExpAction)` is always true. The main/your pair only means the attached notes changed, probably from the PR's new error-path merging in `infer`/`addToErrorPath`. The PR's notes are correct and readable: they assume `action` is non-null and say the assigned value is never 0. Main's notes are not shown, so no clear gain or loss in accuracy can be identified. The warning itself is unchanged for users. ---- 17 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kristall/kristall_0.4+dfsg.orig.tar.xz Result: main kristall-0.4/src/documentoutlinemodel.cpp:129:9: style: Condition 'childItem' is always true [knownConditionTrueFalse] Explanation: The same warning, 'Condition childItem is always true', is reported at the same location by both main and the PR. Only the note lines differ: the PR version shows the assignment note. The warning itself is a true positive, because the address of an array or container element, `&parentItem->children[row]`, is never null. The message text is unchanged, so users see no meaningful difference. ---- 18 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kylin-wayland-compositor/kylin-wayland-compositor_1.3.2.orig.tar.xz Result: main kylin-wayland-compositor-1.3.2/src/view/tile/tile_assist.c:862:13: style: Condition '!item_tmp->tree' is always false [knownConditionTrueFalse] Explanation: Both main and the PR report the same warning at line 862; only the attached note/error path differs. The warning is a false positive in both versions. `item_tmp` is reassigned by a fresh `wl_list_for_each` loop, so the null check on `item_tmp->tree` at 847 says nothing about the elements visited at 862. The PR neither removes nor fixes it, so the change does not matter to users. ---- 19 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libc/libconvert-uulib-perl/libconvert-uulib-perl_1.8+dfsg.orig.tar.xz Result: main Convert-UUlib-1.8/uulib/uucheck.c:312:30: style: Condition 'iter!=ptonum' is always true [knownConditionTrueFalse] Explanation: The warning is not really removed. The same knownConditionTrueFalse at uucheck.c:312 is still reported by the PR, now with error-path notes attached. The warning is a true positive: line 289 does `continue` when `iter == ptonum`, and `iter` is not changed before line 312, so `iter != ptonum` is always true there. The only difference is the extra notes, which point to the guarding condition at 289. That is at most a slight gain in context; users see the same finding either way. ---- 20 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/libg/libgtop2/libgtop2_2.41.3.orig.tar.xz Result: main libgtop-2.41.3/sysdeps/aix/procsignal.c:69:11: error: Shifting 32-bit value by 63 bits is undefined behaviour [shiftTooManyBits] Explanation: `NB_BITS` is `8 * sizeof(guint64)`, which is 64. On the first iteration (`i = 0`) the shift count `NB_BITS - 1 - (i % NB_BITS)` is 63, and the left operand `1` is a 32-bit `int`. Shifting it by 63 is undefined behaviour, as is any shift count of 32 or more (every `i` below 32). The warning was a real bug. The PR's new handling of possibly-wrapping unsigned (`size_t`) arithmetic and range bounds apparently drops the shift-count value 63, so this true positive is lost. ---- 21 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libp/libprelude/libprelude_5.2.0.orig.tar.gz Result: main libprelude-5.2.0/libltdl/argz.c:92:7: style: Condition 'argz_len' is always true [knownConditionTrueFalse] libprelude-5.2.0/libltdl/argz.c:91:15: note: Assignment 'argz_len=1+strlen(str)', assigned value is greater than 0 libprelude-5.2.0/libltdl/argz.c:92:7: note: Condition 'argz_len' is always true Explanation: `argz_len = 1 + strlen(str)` cannot be 0. Any string's length is at most SIZE_MAX-1, because the object must also hold the terminating NUL. So `if (argz_len)` really is always true, and main's warning was a true positive, even though the check is redundant defensive code. The PR now treats the unsigned `1 + strlen(...)` as possibly wrapping to 0 and drops the lower bound. That wrap cannot happen here, so losing the warning is a lost true positive. ---- 22 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/libq/libquicktime/libquicktime_1.2.4.orig.tar.gz Result: your libquicktime-1.2.4/src/lqt_quicktime.c:126:6: style: Condition 'moov_exists' is always true [knownConditionTrueFalse] libquicktime-1.2.4/src/lqt_quicktime.c:111:6: note: Assuming that condition '!moov_exists' is not redundant libquicktime-1.2.4/src/lqt_quicktime.c:118:6: note: Assuming condition is false libquicktime-1.2.4/src/lqt_quicktime.c:126:6: note: Condition 'moov_exists' is always true Explanation: The warning itself is a true positive both before and after the PR: the function returns early at line 111 when `!moov_exists`, so `moov_exists` is always true at line 126. Only the error-path notes appear to have changed. The new path adds 'Assuming condition is false' at line 118 (`!mdat_exists`). That condition lies on the path to line 126 but does not cause `moov_exists` to be true, so the note is mildly redundant without being wrong. The main version's notes are not shown, so this cannot be judged as clearly better or worse. Users see the same finding at the same location. ---- 23 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libx/libxmp/libxmp_4.7.4.orig.tar.gz Result: main libxmp-4.7.4/src/loaders/vorbis.c:5322:19: style: Condition 'v<0' is always false [knownConditionTrueFalse] libxmp-4.7.4/src/loaders/vorbis.c:5320:18: note: Assignment 'v=(int)(temp.f=(buffer[i])+(1.5f*(1<<(23-15))+0.5f/(1<<15)),temp.i-(((150-15)<<23)+(1<<22)))', assigned value is greater than -1 libxmp-4.7.4/src/loaders/vorbis.c:5321:38: note: Assuming condition is true libxmp-4.7.4/src/loaders/vorbis.c:5322:19: note: Condition 'v<0' is always false Explanation: The code computes v = temp.i - ADDEND(15), an int built from a float/int union, and v can be negative. When (unsigned)v + 32768 > 65535, v is outside [-32768, 32767] and may be below zero, so the check 'v < 0' is genuinely needed. Main's claim that v is 'greater than -1' comes from a mis-derived lower bound: it ignored that (unsigned int)v + 32768 can wrap, or wrongly treated the comma-expression value as non-negative. The PR stops unsigned-wrap range bounds from propagating, which removes this false positive. ---- 24 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/matchbox-window-manager/matchbox-window-manager_1.2.3.orig.tar.xz Result: your matchbox-window-manager-1.2.3/src/wm.c:2117:10: style: Condition 'wmhints' is always true [knownConditionTrueFalse] matchbox-window-manager-1.2.3/src/wm.c:2106:44: note: Assuming that condition '(wmhints=XGetWMHints(w->dpy,win))!=NULL' is not redundant matchbox-window-manager-1.2.3/src/wm.c:2117:10: note: Condition 'wmhints' is always true Explanation: Inside the `if ((wmhints = XGetWMHints(...)) != NULL)` block, `wmhints` is never reassigned, so `if (wmhints)` at line 2117 is always true. The warning is a true positive in both versions. Only the extra note lines changed: the PR adds the 'Assuming that condition ... is not redundant' note that points to the guarding condition at line 2106. That explains to the user why the condition is always true, so the message is more helpful. ---- 25 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mc/mc_4.8.33.orig.tar.xz Result: main mc-4.8.33/lib/search/regex.c:693:13: style: Condition 'len==(gsize)(-1)' is always false [knownConditionTrueFalse] Explanation: `len` is a `gsize` function parameter, and the code checks it against `(gsize)(-1)`, which is a common sentinel meaning 'use strlen'. Callers can pass `-1`, so the condition is not always false. Main likely truncated or mishandled the cast of -1 to unsigned and wrongly concluded the comparison could never be true. The PR reworks cast and value conversion handling, so removing this false positive is an improvement. ---- 26 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/micropolis-activity/micropolis-activity_0.0.20071228.orig.tar.gz Result: main micropolis-activity/src/tcl/tclglob.c:452:38: style: Condition '*p!='/'' is always true [knownConditionTrueFalse] Explanation: The removed 'main' line is not really gone. The PR reports the same warning at the same location with the same text, and only adds an error-path note ('Assuming that condition name[1]=='/' is not redundant'). In the loop `for (p = &name[1]; (*p != 0) && (*p != '/'); p++)`, the else branch only guarantees `name[1] != '/'` for the first iteration. Later iterations can stop at '/', so the warning looks like a false positive in both versions. The PR neither fixes nor introduces it; only extra note lines are attached, which does not matter to users. ---- 27 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/musescore-snapshot/musescore-snapshot_3.2.s20190704+dfsg1.orig.tar.xz Result: main musescore-snapshot-3.2.s20190704+dfsg1.orig/libmscore/note.cpp:2153:96: style: Condition '_accidental==0' is always false [knownConditionTrueFalse] Explanation: Both main and the PR report the same warning at note.cpp:2153:96 with the same text ('_accidental==0' is always false). The 'main' line is matched by an identical 'your' line, so this is a pairing or ordering artifact, perhaps from slightly different notes, not a real addition or removal. The PR does not change what users see here. ---- 28 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ngetty/ngetty_1.1.orig.tar.gz Result: main ngetty-1.1/fmt_utmp_ip.c:43:36: warning: Either the condition 'k<14' is redundant or the array 'ip[16]' is accessed at index 16, which is out of bounds. [arrayIndexOutOfBoundsCond] ngetty-1.1/fmt_utmp_ip.c:45:12: note: Assuming that condition 'k<14' is not redundant ngetty-1.1/fmt_utmp_ip.c:35:21: note: Compound assignment '+=', assigned value is 15 ngetty-1.1/fmt_utmp_ip.c:36:19: note: Assuming condition is false ngetty-1.1/fmt_utmp_ip.c:43:36: note: Array index out of bounds Explanation: In the second loop, `k` starts at 0 and steps by 2. The only other change is `k += len0-2`. `len0` comes from `k-pos1`, and both values are always even (`pos1` is set from an even `k`, and the special case sets `k=16`). So `k` stays even, is at most 14 inside the loop, and `ip[k+1]` never goes past `ip[15]`. The removed warning relied on `k` being 15 after the `+=`, which cannot happen at runtime. It also linked the unrelated `k<14` check to the access. The warning was a false positive, so removing it is an improvement. ---- 29 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/openssh/openssh_10.6p1.orig.tar.xz Result: main openssh-10.6p1/regress/unittests/match/tests.c:39:36: style: Condition '*pattern!='*'' is always true [knownConditionTrueFalse] Explanation: This is a true positive. The loop `while (*pattern == '*') pattern++;` only exits when `*pattern != '*'`, so the later check `*pattern != '*'` on line 39 is always true. The PR keeps the same warning with the same text and only attaches an error path (notes about the loop condition and the `!*pattern` check). The 'main' line disappears only because the 'your' line now carries extra notes. Nothing is lost or gained for users beyond slightly more context in the trace. ---- 30 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/phnxdeco/phnxdeco_0.33.orig.tar.gz Result: main phnxdeco-0.33.orig/src/kernel.c:128:48: error: Shifting by a negative value is undefined behaviour [shiftNegative] Explanation: Line 128 computes `subbitbuf >> (CHAR_BIT - bitcount)`. `bitcount` is only ever set to `CHAR_BIT` (line 132) or reduced by `bitcount -= n`. That subtraction runs only after the loop has ensured `n <= bitcount`, so `bitcount` stays in 0..CHAR_BIT. The shift count `CHAR_BIT - bitcount` therefore can never be negative, and main's shiftNegative error was a false positive. The PR makes ValueFlow more careful about ranges and conditional values (no unsound unsigned-wrap or merged range bounds), which plausibly removes this bogus negative value. Removing the warning is an improvement. ---- 31 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/psychtoolbox-3/psychtoolbox-3_3.0.22.3+dfsg.orig.tar.xz Result: your Psychtoolbox-3-Psychtoolbox-3-0956db7/Psychtoolbox/PsychHardware/iViewXToolbox/cbase64/AMMimeUtils.cpp:508:14: style: Condition '*s!='\0'' is always true [knownConditionTrueFalse] Psychtoolbox-3-Psychtoolbox-3-0956db7/Psychtoolbox/PsychHardware/iViewXToolbox/cbase64/AMMimeUtils.cpp:457:13: note: Assuming that condition '*s!='\0'' is not redundant Psychtoolbox-3-Psychtoolbox-3-0956db7/Psychtoolbox/PsychHardware/iViewXToolbox/cbase64/AMMimeUtils.cpp:459:12: note: Assuming condition is false Psychtoolbox-3-Psychtoolbox-3-0956db7/Psychtoolbox/PsychHardware/iViewXToolbox/cbase64/AMMimeUtils.cpp:508:14: note: Condition '*s!='\0'' is always true Explanation: Both main and the PR report the same warning at the same location, so this is a changed message rather than a new finding. The warning is a true positive. Line 457 is presumably the loop condition `while (*s != '\0')` (that line is not shown). Line 459 is presumably the `if (*s == '=')` branch. In the else branch `s` has not changed, so `*s != '\0'` at line 508 is always true. The PR's only change is that the message now carries an error path (loop condition, then the false branch at 459, then line 508). This correctly explains why the condition is redundant, so the message is slightly more informative. ---- 32 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/py-tree-sitter/py-tree-sitter_0.25.1+repack.orig.tar.xz Result: main py-tree-sitter-0.25.1/tree_sitter/core/lib/src/node.c:648:25: style: Condition 'field_map==field_map_end' is always false [knownConditionTrueFalse] Explanation: Both main and your report the same knownConditionTrueFalse warning at node.c:648 with identical text. The pair shows up only because the attached notes differ. The warning itself is a true positive. Line 648 is reached only in the else branch of `field_map + 1 == field_map_end`, so after `field_map++` the pointer cannot equal `field_map_end`. The PR's notes describe this reasoning correctly. Main's notes are not shown, so there is no sign the message became less accurate. For users this is effectively no change. ---- 33 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/pybj/pybj_0.2.6.orig.tar.gz Result: your pybj-0.2.6/src/decoder.c:518:39: style: Comparing expression of type 'signed long long' against value 9223372036854775807. Condition is always true. [compareValueOutOfTypeRangeError] Explanation: Line 518 checks `value >= LONG_MIN && value <= LONG_MAX` with `value` a `long long`. It decides whether `PyLong_FromLong` can be used safely. On the analysed LP64 platform, `LONG_MAX` equals `LLONG_MAX`, so `value <= LONG_MAX` is indeed always true there. The old code skipped 64-bit types (`bits >= 63`); the PR now checks them. However, `LONG_MAX` is a platform-dependent macro, and this is a deliberate portability guard: on LLP64 (Windows) or 32-bit platforms, `long` is 32 bits and the check matters. The warning cannot be acted on, because removing the guard would break other platforms. So it is effectively a false positive for users, even though it is formally true for the configured platform. ---- 34 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pyparted/pyparted_3.13.0.orig.tar.gz Result: your pyparted-3.13.0/src/pygeom.c:702:9: style: Condition 'ret' is always true [knownConditionTrueFalse] pyparted-3.13.0/src/pygeom.c:688:13: note: Assuming that condition 'ret==0' is not redundant pyparted-3.13.0/src/pygeom.c:702:9: note: Condition 'ret' is always true Explanation: After `if (ret == 0) { ... return NULL; }`, `ret` is necessarily non-zero, so `if (ret)` at line 702 is always true. The warning is a true positive and is reported by both main and the PR. Only the textual rendering changed: the 'your' line now prints the error path notes, and the same pattern repeats for every warning in this package. The finding itself is unchanged, so this does not matter to users. ---- 35 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/python-dmidecode/python-dmidecode_3.12.3.orig.tar.gz Result: main python-dmidecode-3.12.3/src/dmidecodemodule.c:804:24: style: Condition 'f==NULL' is always false [knownConditionTrueFalse] Explanation: Line 804 sits inside `if(f)`, so `f==NULL` really is always false. The warning is a true positive and both main and your report it. The only difference is that the 'your' line carries extra notes (the assumption at line 797 and 'Assuming condition is false' at 801), likely because the diff also compared the notes. The warning, its location and its message are the same, so nothing meaningful changed for users. ---- 36 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/quanty/quanty_0.9.0+ds.orig.tar.xz Result: main release-0.9.0-9d1c7f3e5eba5953173b104017786246bc4d397f/Tight_Binding/Cif.cpp:96:21: error: Array 'M[3][3]' accessed at index M[3][0], which is out of bounds. [arrayIndexOutOfBounds] release-0.9.0-9d1c7f3e5eba5953173b104017786246bc4d397f/Tight_Binding/Cif.cpp:95:5: note: After for loop, i has value 3 release-0.9.0-9d1c7f3e5eba5953173b104017786246bc4d397f/Tight_Binding/Cif.cpp:96:21: note: Array index out of bounds Explanation: Line 95 is `for(i=0;i<3 && !Finite[i];i++);` and its exit condition is compound. The loop can stop early when `Finite[i]` is true, so its final value is not necessarily 3. Inside the `NFinite==1` branch, exactly one `Finite[i]` should be true, so the loop exits with i<3. Main wrongly claimed 'After for loop, i has value 3' and reported a definite out-of-bounds error. The PR no longer derives an exact after-loop value for compound loop conditions (the partialCond change in valueFlowForLoop), which removes this likely false positive. ---- 37 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-sna/r-cran-sna_2.8.orig.tar.gz Result: your sna/src/layout.c:621:38: style: Condition 'k!=l' is always true [knownConditionTrueFalse] sna/src/layout.c:621:30: note: Assuming that condition 'k!=l' is not redundant sna/src/layout.c:621:38: note: Condition 'k!=l' is always true Explanation: Line 621 has the duplicated subexpression `(k!=l)&&(k!=l)`. Once the first `k!=l` is true, the second one is always true, so the warning is a true positive. Main reports the same warning. The 'main' and 'your' lines differ only in the notes attached to it, so for users the output is essentially unchanged. ---- 38 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rggobi/rggobi_2.1.22.orig.tar.gz Result: main rggobi/src/conversion.c:120:6: style: Condition 'val' is always true [knownConditionTrueFalse] Explanation: In `asRString`, line 116 returns early when `val` is NULL, so `if(val)` on line 120 is always true. The warning is a true positive in both versions. The PR keeps the same warning and adds an error path pointing back to the `!val` check on line 116. That explains to the user why the condition is always true, so the message is more informative and nothing is lost. ---- 39 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz Result: your salmon-1.10.3/src/SalmonUtils.cpp:1124:40: style: Condition 'keyStr!=NULL' is always true [knownConditionTrueFalse] salmon-1.10.3/src/SalmonUtils.cpp:1124:18: note: Assuming that condition 'keyStr!=nullptr' is not redundant salmon-1.10.3/src/SalmonUtils.cpp:1124:40: note: Condition 'keyStr!=NULL' is always true Explanation: The same warning is reported by both main and the PR. Only the extra note lines differ: the PR now shows the error path 'Assuming that condition keyStr!=nullptr is not redundant'. The warning is a true positive, because 'keyStr != NULL' after 'keyStr != nullptr and' is redundant. The added note explains the reasoning correctly, but it does not change the finding for users. ---- 40 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/searchandrescue/searchandrescue_1.7.0+dfsg.orig.tar.xz Result: your searchandrescue_1.7.0/sar/simutils.c:1752:39: style: Condition 'cur_passengers_leave_pending!=NULL' is always true [knownConditionTrueFalse] searchandrescue_1.7.0/sar/simutils.c:1748:34: note: Assuming that condition 'cur_passengers_leave_pending!=NULL' is not redundant searchandrescue_1.7.0/sar/simutils.c:1750:32: note: Assuming condition is true searchandrescue_1.7.0/sar/simutils.c:1752:39: note: Condition 'cur_passengers_leave_pending!=NULL' is always true Explanation: The warning is a true positive. Line 1752 re-checks 'cur_passengers_leave_pending != NULL' inside the block guarded by the same check at line 1748, so it is always true. Main reports the same warning. The only difference is the 'your' version has an extra or changed note: 'Assuming condition is true' at line 1750. That note is a little odd but does not matter to users. The warning text and location are unchanged. ---- 41 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/serf/serf_1.3.10.orig.tar.bz2 Result: main serf-1.3.10/buckets/response_buckets.c:320:26: style: Condition 'v' is always true [knownConditionTrueFalse] Explanation: The warning is the same in main and in the PR, at the same location and with the same message. The diff shows it once as removed and once as added only because its notes/error path changed (the note 'Assuming that condition v is not redundant' at line 313). In the code, `v` is checked by `if (v)` on line 313, so the `v &&` at line 320 is indeed always true. The warning is a true positive both before and after the change, so nothing changes for users. ---- 42 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sipsak/sipsak_0.9.8.1.orig.tar.gz Result: main sipsak-0.9.8.1/src/sipsak.c:979:22: style: Condition 'options.mode==SM_MESSAGE' is always false [knownConditionTrueFalse] Explanation: The same warning, with the same location, message and error path, appears in both main and your output. It only shows up in the diff because the comparison treats it as removed and re-added, likely due to formatting or order differences. The diagnosis is unchanged, so this does not matter to users. ---- 43 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sjeng/sjeng_11.2.orig.tar.gz Result: your sjeng-11.2.orig/partner.c:766:46: style: Condition 'queenmated==0' is always false [knownConditionTrueFalse] sjeng-11.2.orig/partner.c:766:27: note: Assuming that condition 'queenmates==0' is not redundant sjeng-11.2.orig/partner.c:762:18: note: Assuming that condition 'queenmates!=queenmated' is not redundant sjeng-11.2.orig/partner.c:766:46: note: Condition 'queenmated==0' is always false Explanation: The warning is reported by both main and your. Only the line pairing changed: the main line and the your line for partner.c:766 have the same message. Inside `if (queenmates != queenmated)`, if `queenmates == 0` then `queenmated` cannot be 0, so `queenmated == 0` is always false. This is a true positive, and it is reported the same way before and after the PR. No change for users. ---- 44 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/t/tokyocabinet/tokyocabinet_1.4.48.orig.tar.gz Result: your tokyocabinet-1.4.48/tctdb.c:4503:8: style: Condition '!a->vbuf' is always false [knownConditionTrueFalse] tokyocabinet-1.4.48/tctdb.c:4498:6: note: Assuming that condition '!a->vbuf' is not redundant tokyocabinet-1.4.48/tctdb.c:4502:6: note: Assuming condition is true tokyocabinet-1.4.48/tctdb.c:4503:8: note: Condition '!a->vbuf' is always false Explanation: At line 4503, `!a->vbuf` really is always false: the function already returned at line 4498 when `a->vbuf` was null. So the warning is a true positive in both versions. Main and the PR report the same warning with the same text. The only difference is the note lines, and the PR's notes give a reasonable explanation of why the condition is always false. Nothing changes for users in any meaningful way. ---- 45 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/twinkle/twinkle_1.10.3+dfsg.orig.tar.xz Result: main twinkle-1.10.3/src/phone_user.cpp:1159:7: style: Condition 'r->body' is always true [knownConditionTrueFalse] Explanation: Line 1148 returns early when '!r->body', so 'r->body' at line 1159 really is always true. Both main and the PR report this true positive. The only visible difference is that the 'your' version shows notes tying the warning to the earlier condition at line 1148. The warning itself is unchanged, so this does not matter to users either way. ---- 46 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/ukui-quick/ukui-quick_4.22.0.1.orig.tar.gz Result: main ukui-quick-4.22.0.1/items/icon.cpp:258:21: style: Condition 'size>20' is always true [knownConditionTrueFalse] ukui-quick-4.22.0.1/items/icon.cpp:256:14: note: Assuming that condition 'size<=20' is not redundant ukui-quick-4.22.0.1/items/icon.cpp:258:21: note: Condition 'size>20' is always true Explanation: `size` is a `uint`. Line 258 is in the else branch of `if (size <= 20)`, so `size > 20` there is always true. The redundant sub-condition is genuine, and main's knownConditionTrueFalse report was a true positive. The PR's new handling of unsigned range values and implicit conversions in comparisons drops that range fact, so the PR loses a correct warning. ---- 47 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/wine/wine_10.0~repack.orig.tar.xz Result: main wine-10.0/dlls/oledb32/tests/convert.c:2067:18: style: Comparing expression of type 'char' against value 204. Condition is always false. [compareValueOutOfTypeRangeError] Explanation: The comparison is `dst[2] == (char)0xcc`. Both sides are plain char, so the cast yields the same value that `dst[2]` holds after `memset(dst, 0xcc, ...)`. That value is -52 if char is signed, or 204 if char is unsigned. Either way the condition can be true. Main wrongly treated the cast value as 204 and compared it against a signed char range. The PR fixes the cast/truncation handling and makes compareValueOutOfTypeRange aware of plain char's unknown signedness, so this false positive is gone. ---- 48 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/wit/wit_3.01a.orig.tar.gz Result: main wit-3.01a/dclib/dclib-numeric.c:3484:11: style: Condition 'num>-1000000000000000ull' is always false [knownConditionTrueFalse] wit-3.01a/dclib/dclib-numeric.c:3470:14: note: Assuming that condition 'num>-1000000000' is not redundant wit-3.01a/dclib/dclib-numeric.c:3484:11: note: Condition 'num>-1000000000000000ull' is always false Explanation: `num` is `s64` and in the else branch `num <= -1e9`. In `num > -1000000000000000ull` the right side is unsigned long long (2^64 - 1e15), so `num` is converted to 2^64 + num. The comparison therefore means `num > -1e15`. For values in (-1e15, -1e9] it is true, and for smaller values it is false, so it is not always false. Main's warning was a false positive caused by mishandling the signed/unsigned conversion. The PR removes it. ---- 49 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/x/xwax/xwax_1.10~beta1.orig.tar.gz Result: main xwax-1.10-beta1/rig.c:148:23: style: Condition 'z==-1' is always false [knownConditionTrueFalse] Explanation: `z` is a `size_t` assigned from `read()`. When `read` fails it returns -1, which converts to SIZE_MAX. In `z == -1`, the -1 is also converted to SIZE_MAX, so the condition is true on error. Main reported it as always false because it treated z's unsigned type as making -1 impossible, without applying the usual arithmetic conversion. That was a false positive. The PR converts values to the common integral type before comparing them, so the bogus warning is gone. ---- 50 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/y/yorick/yorick_2.2.04+dfsg1.orig.tar.xz Result: your yorick-2.2.04+dfsg1/yorick/graph.c:309:9: style: Condition 'func' is always true [knownConditionTrueFalse] yorick-2.2.04+dfsg1/yorick/graph.c:301:14: note: Assuming that condition 'func' is not redundant yorick-2.2.04+dfsg1/yorick/graph.c:309:9: note: Condition 'func' is always true Explanation: Inside the 'else if (func)' branch, func is a non-null function parameter. Nothing in between can change it: Safe_strlen, escape_count and AllocTmpLegend all take func by value or do not touch it. So the inner 'if (func)' is redundant and the warning is a true positive. Main already reported the same warning. The PR only re-emits it with a fuller error path (the notes pointing to line 301), which makes the message more informative.