AI review of 2026-11-03_05-27-49-c25237aa64fd-results.txt PR: #8819 https://github.com/cppcheck-opensource/cppcheck/pull/8819 Tested: c25237aa64fd5e76495a06af55af1b5475b2742a Merge base: 0c4dc891c9f2fe0e06c2e544eeda4514b80e1ce9 Reviewed: 2026-11-04 13:22:08 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 2730 in the report (random sample), 54 not reviewed: valueFlowMaxIterations Verdicts: 25 improvement, 21 neutral, 4 regression Tokens: 106923 input, 3040664 cache read, 760166 cache write, 17947 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/ascii2binary/ascii2binary_2.14.orig.tar.gz Result: your ascii2binary-2.14/ascii2binary.c:573:20: style: Comparing expression of type 'signed long long' against value -9223372036854775808. Condition is always false. [compareValueOutOfTypeRangeError] Explanation: `sqval` is `signed long long`. The analysis used a 64-bit platform, where `LONG_MIN` equals `LLONG_MIN` (-9223372036854775808). So `sqval < LONG_MIN` can never be true, and 'Condition is always false' is correct for that platform. The old code skipped 64-bit types (`bits >= 63`), which is why main missed it. The PR now computes 64-bit bounds correctly and reports this platform-dependent, always-false comparison, which is exactly what this check is for. The guard does make sense on ILP32 platforms, but the checker is explicitly platform-specific, so this is a true positive. ---- 2 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ascii2binary/ascii2binary_2.14.orig.tar.gz Result: your ascii2binary-2.14/ascii2binary.c:578:20: style: Comparing expression of type 'signed long long' against value 9223372036854775807. Condition is always false. [compareValueOutOfTypeRangeError] Explanation: `sqval` is `signed long long`. On the analyzed 64-bit platform `LONG_MAX` equals `LLONG_MAX` (9223372036854775807), so `sqval > LONG_MAX` can never be true there. The new warning is accurate for that platform. The old code skipped every type of 63 bits or more, so it missed this case, but it already reported the same pattern for 32-bit types (e.g. `int_var > INT_MAX`). The PR makes this platform-dependent check consistent for 64-bit types. Some users may see a portable range check like this as noise, but the warning is technically correct. ---- 3 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/atomicparsley/atomicparsley_20240608.083822.1ed9031.orig.tar.gz Result: your atomicparsley-20240608.083822.1ed9031/src/extracts.cpp:1345:42: style: Condition 'track_info->track_codec==0x73323633' is always false [knownConditionTrueFalse] atomicparsley-20240608.083822.1ed9031/src/extracts.cpp:1329:40: note: Assuming that condition 'track_info->track_codec==0x73323633' is not redundant atomicparsley-20240608.083822.1ed9031/src/extracts.cpp:1338:72: note: Assuming condition is false atomicparsley-20240608.083822.1ed9031/src/extracts.cpp:1345:42: note: Condition 'track_info->track_codec==0x73323633' is always false Explanation: Line 1345 sits inside the final `else` of the chain started at line 1329, which only runs when `track_info->track_codec == 0x73323633` (s263) is false. Between the two checks, the only calls are `APar_TrackLevelInfo(track, "esds")` and `memcmp`. The first takes the Trackage `track`, not `track_info`, and is not expected to change `track_codec`. So the s263 test at 1345 really is always false; it is dead, redundant code. The new knownConditionTrueFalse warning looks like a true positive, likely enabled by the PR's improved value tracking for unsigned comparisons. The other diff lines are unchanged warnings with only note changes. ---- 4 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: your code-saturne-7.0.2.orig/src/alge/cs_balance_by_zone.c:972:16: style: Condition 'field_id!=-1' is always true [knownConditionTrueFalse] code-saturne-7.0.2.orig/src/alge/cs_balance_by_zone.c:830:16: note: Assuming that condition 'field_id==-1' is not redundant code-saturne-7.0.2.orig/src/alge/cs_balance_by_zone.c:878:26: note: Assuming condition is false code-saturne-7.0.2.orig/src/alge/cs_balance_by_zone.c:972:16: note: Condition 'field_id!=-1' is always true Explanation: The same knownConditionTrueFalse warning for 'field_id!=-1' at line 972 is reported by both main and the PR. Only the error-path notes differ: the PR adds an 'Assuming condition is false' step at line 878. Line 830 presumably handles field_id==-1 (likely an error exit), so the warning stays valid either way. Lines 830 and 878 are not shown, so it cannot be judged whether the extra note makes the path more or less accurate. For users the diagnostic is essentially unchanged. ---- 5 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/connman-gtk/connman-gtk_1.1.1+git20180626.b72c6ab.orig.tar.xz Result: your connman-gtk-master/src/service.c:592:5: style: Condition 'prop' is always true [knownConditionTrueFalse] connman-gtk-master/src/service.c:589:5: note: Assuming that condition '!prop' is not redundant connman-gtk-master/src/service.c:592:5: note: Condition 'prop' is always true Explanation: The warning itself is unchanged and correct. After `if(!prop) return ...;` at line 589, `prop` is always non-null at line 592, so the redundant check is real. The only difference is that the new output includes notes explaining the reasoning: line 589 assumed not redundant, then line 592 always true. That makes the message more informative for users. ---- 6 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/direwolf/direwolf_1.8.1+dfsg1.orig.tar.xz Result: main wb2osz-direwolf-a231971/src/hdlc_rec.c:279:35: style: Comparing expression of type 'char' against value 127. Condition is always true. [compareValueOutOfTypeRangeError] Explanation: In `ch >= ' ' && ch <= 0x7f`, `ch` is a plain `char`. Whether `ch <= 0x7f` is always true depends on the ABI. With signed char (x86) it always holds. With unsigned char (ARM, PowerPC, s390x, all Debian targets) values 128..255 make it false, and the check is what enforces the 'MSB must be 0' rule from the comment. The PR now evaluates plain char under both signed and unsigned interpretations and reports only when the result is the same for both. Since the comparison is meaningful on unsigned-char platforms, calling it 'always true' was misleading for this portable code. Removing the warning is likely a false positive gone. One caveat: the new logic also ignores a configured default char sign, so on a strictly signed-char analysis the old warning was technically correct. ---- 7 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/direwolf/direwolf_1.8.1+dfsg1.orig.tar.xz Result: your wb2osz-direwolf-a231971/src/pfilter.c:1174:12: style: Condition 'pri!=NULL' is always true [knownConditionTrueFalse] wb2osz-direwolf-a231971/src/pfilter.c:1099:10: note: Assuming that condition 'pri!=NULL' is not redundant wb2osz-direwolf-a231971/src/pfilter.c:1166:32: note: Assuming condition is false wb2osz-direwolf-a231971/src/pfilter.c:1173:33: note: Assuming condition is true wb2osz-direwolf-a231971/src/pfilter.c:1174:12: note: Condition 'pri!=NULL' is always true Explanation: Both versions report the same warning at the same location: `pri!=NULL` at line 1174 is always true. That is a true positive. Around line 1099, `pri` is checked, and the else branch reports an error and returns, so `pri` is non-NULL afterwards. The only visible difference is the attached note trail. The added notes at lines 1166 and 1173 ('Assuming condition is false/true') are not needed for the conclusion but are not wrong either. The finding itself does not change for users. ---- 8 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/discount/discount_2.2.7.orig.tar.gz Result: main discount-2.2.7/generate.c:869:16: style: Condition 'count' is always true [knownConditionTrueFalse] Explanation: Both main and the PR report the same warning at generate.c:869: `count` is always true. Only the attached notes differ. The warning is correct. Line 866 enters the block only when `count = nrticks(...)` is nonzero, so the `else if (count)` test is always true. The PR's notes trace this correctly: the assignment in the condition, then `count == ticks` being false. Main's notes are not shown, so there is no evidence that either version is more accurate. The diagnostic itself is unchanged. ---- 9 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/discount/discount_2.2.7.orig.tar.gz Result: your discount-2.2.7/tools/pandoc_headers.c:65:7: style: Condition 'opt' is always true [knownConditionTrueFalse] discount-2.2.7/tools/pandoc_headers.c:64:17: note: Assuming that condition 'opt=gethopt(&blob,opts,sizeof(opts)/sizeof(opts[0]))' is not redundant discount-2.2.7/tools/pandoc_headers.c:65:7: note: Condition 'opt' is always true Explanation: Both main and your report the same warning at the same location: 'opt' is always true inside the while loop whose condition is `opt = gethopt(...)`. That is a correct (if minor) style finding. The diff shows one main line and one your line with identical text. The only difference is likely the attached notes or error path, and both paths are equivalent. The warning itself is unchanged, so this does not matter to users. ---- 10 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/d/dump1090-mutability/dump1090-mutability_1.15~20180310.4a16df3+dfsg.orig.tar.gz Result: your dump1090-mutability/mode_s.c:256:36: error: Shifting 32-bit value by 32 bits is undefined behaviour [shiftTooManyBits] dump1090-mutability/mode_s.c:1269:26: note: Calling function 'getbits', 3rd argument '40' value is 40 dump1090-mutability/mode_s.c:240:28: note: Assignment 'lbi=lastbit-1', assigned value is 39 dump1090-mutability/mode_s.c:247:24: note: Assignment 'shift=7-(lbi&7)', assigned value is 0 dump1090-mutability/mode_s.c:254:13: note: Assuming condition is true dump1090-mutability/mode_s.c:256:36: note: Shift Explanation: The new warning says `(data[fby] & topmask) << (32 - shift)` shifts by 32 when `shift == 0`. Here `shift == 0` because `lastbit` is 40, so `lbi = 39`. The `nby == 5` branch needs the bits to span 5 bytes, and with `lby = 4` that means `fby = 0`, i.e. `firstbit <= 8`. That gives `nbi >= 33`, which contradicts `assert(nbi <= 32)`. More generally, 5 spanned bytes with at most 32 extracted bits always leaves at least one unused trailing bit, so `shift >= 1` in this branch. The trace only gets there by 'Assuming condition is true' for `nby == 5`, combining values that cannot occur together. This is a new false positive. ---- 11 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/elvis-tiny/elvis-tiny_1.4.orig.tar.gz Result: your elvis-tiny-1.4.orig/input.c:166:6: style: Condition 'dig' is always true [knownConditionTrueFalse] elvis-tiny-1.4.orig/input.c:148:6: note: Assuming that condition '!dig' is not redundant elvis-tiny-1.4.orig/input.c:166:6: note: Condition 'dig' is always true Explanation: Both versions report the same true positive. `if (!dig) { ... return; }` at line 148 always returns, so `dig` is nonzero at line 166 and the `dig &&` part of `dig && !dp` is redundant. The only change is that the new output adds an error path pointing to the `!dig` check at line 148 that makes `dig` always true. That note is correct and makes the warning easier to understand. ---- 12 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/exifprobe/exifprobe_2.0.1+git20201230.eee65ff.orig.tar.xz Result: main exifprobe-2.0.1+git20201230.eee65ff/print_maker.c:725:16: style: Condition 'pattern' is always true [knownConditionTrueFalse] Explanation: The same knownConditionTrueFalse warning at print_maker.c:725 is reported by both main and your. The 'your' line differs only because it carries extra note lines (the error path), so the main/your pair is an artifact of how the outputs were compared. The warning itself is correct: 'pattern' is assigned the non-null Camera_name_pattern inside 'if(Camera_name_pattern)' and is not changed in the loop, so 'if(pattern)' is always true. The diagnostic is unchanged for users. ---- 13 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/ginkgocadx/ginkgocadx_3.8.8.orig.tar.gz Result: main ginkgocadx-3.8.8/cadxcore/wx/thumbnailctrl/thumbnailctrl.cpp:1074:18: style: Condition 'ppuY!=0' is always true [knownConditionTrueFalse] Explanation: The same warning is still reported by both versions. Only the attached notes differ: the 'your' line carries notes, which shows how the diff tool matched the lines rather than any real change. The warning is a true positive: ppuY==0 returns early at line 1063, so 'ppuY != 0' at line 1074 is always true. ---- 14 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/g/gluas/gluas_0.1.20.orig.tar.gz Result: main gluas-0.1.20/src/preview_layer.c:64:7: style: Condition 'layers' is always true [knownConditionTrueFalse] Explanation: Both versions report the same true positive at the same location. `layers` was already checked by the early `if (!layers) return 0;` at line 50, so `if (layers)` at line 64 is always true. Only the error-path notes differ. The new path adds "Assuming condition is false" at line 58 (`*iter == layer_ID`), which has nothing to do with whether `layers` is null. That makes the path slightly noisier but does not change the finding. ---- 15 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gmime/gmime_3.2.15+dfsg.orig.tar.xz Result: main gmime-3.2.15/gmime/gmime-filter-yenc.c:551:9: style: Condition 'c=='\0'' is always false [knownConditionTrueFalse] gmime-3.2.15/gmime/gmime-filter-yenc.c:544:7: note: Assignment 'c=*inptr++', assigned value is greater than -1 gmime-3.2.15/gmime/gmime-filter-yenc.c:549:3: note: Compound assignment '+=', assigned value is 41 gmime-3.2.15/gmime/gmime-filter-yenc.c:551:9: note: Condition 'c=='\0'' is always false Explanation: `c` is an `unsigned char`, and `c += 42` wraps modulo 256. When the input byte is 214, `c` becomes 0, so `c == '\0'` can be true. The note "assigned value is 41" shows that main shifted the impossible bound without accounting for wraparound, so its 'always false' report was a false positive. The PR stops shifting impossible range bounds through `+=` on unsigned or narrow types, which removes this false positive. ---- 16 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnome-calendar/gnome-calendar_51.0.orig.tar.xz Result: main gnome-calendar-51.0/src/gui/calendar-management/gcal-edit-calendar-page.c:100:7: style: Condition 'has_webdav' is always true [knownConditionTrueFalse] Explanation: The warning at line 100 is reported by both main and your. Only the text changed: the PR version adds supporting notes ('Assuming that condition '!has_webdav' is not redundant'). The warning itself is a true positive. After the early return when `!has_webdav || !has_auth`, `has_webdav` must be true at line 100. The main line paired with the your line is just the same finding with a different error path, so nothing changes for users. ---- 17 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnubik/gnubik_2.4.3.orig.tar.gz Result: main gnubik-2.4.3/src/drwBlock.c:271:8: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] Explanation: `cv->texName[face]` is presumably a `GLuint` (unsigned int) used with -1 as a 'no texture' sentinel. In `-1 == unsigned`, the -1 is converted to UINT_MAX, so the comparison can be true when the field was set to -1. The old 'Condition is always false' warning was a false positive. The PR now applies the usual arithmetic conversions to find the common unsigned type, and sees that the converted value is within unsigned int's range, so it no longer reports it. ---- 18 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/h/htdig/htdig_3.2.0b6.orig.tar.gz Result: your htdig-3.2.0b6/htword/WordList.cc:164:40: style: Condition 'flags==0' is always false [knownConditionTrueFalse] htdig-3.2.0b6/htword/WordList.cc:155:6: note: Assuming that condition 'flags' is not redundant htdig-3.2.0b6/htword/WordList.cc:163:50: note: Assuming condition is true htdig-3.2.0b6/htword/WordList.cc:164:40: note: Condition 'flags==0' is always false Explanation: Line 164 checks `flags == 0` inside `if (flags)`, so the condition really is always false. Both versions report the same true positive with the same text. The PR only adds error-path notes. The note pointing to the `if(flags)` at line 155 explains the reasoning, which helps users. The 'Assuming condition is true' note at line 163 adds little but is not wrong. Overall the report is slightly more informative. ---- 19 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/input-pad/input-pad_1.1.0.orig.tar.gz Result: main input-pad-1.1.0/input-pad/window-gtk.c:4824:21: style: Condition 'subname==NULL' is always false [knownConditionTrueFalse] Explanation: The warning still appears at the same location with the same text. Only the line pair differs (main vs your), with the same note path shown. `subname = filename + 3 + strlen(...)` is a non-null pointer plus an offset, so `subname == NULL` is always false. The warning is a true positive in both versions. Only the reported diff/ordering changed, so this is not a meaningful change for users. ---- 20 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iprutils/iprutils_2.4.19.orig.tar.gz Result: main iprutils-rel-2-4-19/iprlib.c:4831:16: style: Condition 'rc' is always true [knownConditionTrueFalse] Explanation: The warning at line 4831 is reported by both versions. `rc` really is always true there, because the earlier `if (!rc) break;` guarantees it, so this is a true positive either way. Only the error path differs: the new version adds a note "Assuming condition is false" at the `&&` on line 4828. That note does not change what the user is told and adds little; the warning itself is the same. ---- 21 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kmod/kmod_34.2.orig.tar.xz Result: your kmod-34.2/testsuite/init_module.c:75:9: style: Condition 'p==NULL' is always false [knownConditionTrueFalse] kmod-34.2/testsuite/init_module.c:67:15: note: Assuming that condition 'modname==NULL' is not redundant kmod-34.2/testsuite/init_module.c:71:27: note: Assuming condition is false kmod-34.2/testsuite/init_module.c:74:28: note: Assignment 'p=modname+modnamelen+1', assigned value is never 0 kmod-34.2/testsuite/init_module.c:75:9: note: Condition 'p==NULL' is always false Explanation: Both versions report the same warning at the same location. Only the error-path notes differ. The warning is correct: `p = modname + modnamelen + 1` is pointer arithmetic on a pointer already checked non-NULL, so `p == NULL` can never be true. The notes in the new output are plausible: `modname` is non-NULL after the check, and the line-71 condition must be false to reach line 74. Main's notes are not shown, so the difference cannot be judged better or worse. For users this is essentially unchanged. ---- 22 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/latte-dock/latte-dock_0.10.9.orig.tar.xz Result: your latte-dock-0.10.9/app/view/positioner.cpp:394:18: style: Condition 'scr' is always true [knownConditionTrueFalse] latte-dock-0.10.9/app/view/positioner.cpp:394:9: note: Assuming that condition '!scr' is not redundant latte-dock-0.10.9/app/view/positioner.cpp:394:18: note: Condition 'scr' is always true Explanation: Line 394 reads `if (!scr || (scr && ...))`. Once `!scr` is false, `scr` is always true, so the redundant-condition warning is a true positive. Both main and the PR report it with the same text; only the shown note lines (error path) may differ. The pair of main/your lines is effectively the same warning, so nothing changes for users. ---- 23 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/libe/libemf2svg/libemf2svg_1.8.1+ds.orig.tar.xz Result: your libemf2svg-1.8.1/src/lib/emf2svg_utils.c:1234:14: style: Condition 'rcmap.uni' is always true [knownConditionTrueFalse] libemf2svg-1.8.1/src/lib/emf2svg_utils.c:1229:19: note: Assuming that condition 'rcmap.uni==NULL' is not redundant libemf2svg-1.8.1/src/lib/emf2svg_utils.c:1234:14: note: Condition 'rcmap.uni' is always true Explanation: The same warning is reported by both versions at the same location. It is correct: after the early return when rcmap.uni == NULL at line 1229, rcmap.uni is always non-null at line 1234. Only the attached notes or the diff representation changed, so users see no meaningful difference. ---- 24 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libg/libgav1/libgav1_0.20.0.orig.tar.xz Result: main libgav1-0.20.0/src/dsp/inverse_transform.cc:1264:42: error:inconclusive: Array 'tx_buffer[64]' accessed at index -1, which is out of bounds. [negativeIndex] libgav1-0.20.0/src/dsp/inverse_transform.cc:1261:18: note: Assignment 'i=0', assigned value is 0 libgav1-0.20.0/src/dsp/inverse_transform.cc:1263:35: note: Assignment 'index=flip_rows?tx_height-i-1:i', assigned value is -1 libgav1-0.20.0/src/dsp/inverse_transform.cc:1264:42: note: Negative array index Explanation: Main reported a negative index from index = tx_height - i - 1 with i=0, which assumes tx_height is 0. Inside the loop i < tx_height holds, so tx_height - i - 1 is at least 0. The earlier do/while loop also implies tx_height >= 1. The index -1 cannot happen, so the removed warning was a false positive. ---- 25 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopaque/libopaque_1.0.1.orig.tar.xz Result: main libopaque-1.0.1/sasl/utils.c:378:15: style: Condition '*rwbuf' is always true [knownConditionTrueFalse] Explanation: The main and your lines are the same warning on the same line with the same text. It only appears in the diff because of noise in the note/ordering lines. The warning itself is a true positive: in the else branch of `if(!(*rwbuf))`, `*rwbuf` is always true. Nothing changes for users. ---- 26 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/libp/libpsl/libpsl_0.23.3.orig.tar.xz Result: your libpsl-0.23.3/src/psl.c:435:24: style: Condition 'input_length_orig>maxint' is always true [knownConditionTrueFalse] Explanation: `maxint` is a `punycode_uint` (a 32-bit unsigned type) initialised with -1, so its value is 0xFFFFFFFF. `input_length_orig` is a 64-bit `size_t` that can hold any length, so `input_length_orig > maxint` is a real overflow guard that can be true or false. Reporting it as always true is a new false positive. It likely comes from the PR's changed integer conversion handling: the value -1 is kept or misconverted instead of being truncated to UINT_MAX, and then compared as signed. ---- 27 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp_2.6.1.orig.tar.gz Result: main libseccomp-2.6.1/src/db.c:2151:28: style: Condition 's_iter->chains!=NULL' is always true [knownConditionTrueFalse] Explanation: The warning is the same in both runs. Only the 'main' line is shown; the full diff shows a matching 'your' line plus notes pointing to the earlier condition 's_iter->chains==NULL' at line 2128. That `else if` branch handles every case where chains is NULL, so `s_iter->chains != NULL` in the following `else if` at line 2151 is always true. The warning is a true positive both before and after. The new version adds an error path explaining why, which makes the message more helpful. ---- 28 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libv/libvisio/libvisio_0.1.11.orig.tar.xz Result: your libvisio-0.1.11/src/lib/VSDParser.cpp:250:19: style: Condition 'ptr.Type' is always true [knownConditionTrueFalse] libvisio-0.1.11/src/lib/VSDParser.cpp:241:20: note: Assuming that condition 'ptr.Type==0' is not redundant libvisio-0.1.11/src/lib/VSDParser.cpp:250:19: note: Condition 'ptr.Type' is always true Explanation: The same warning at line 250 is reported by both main and the PR. Only its accompanying notes differ: the PR adds an error path pointing to the line 241 check `ptr.Type == 0`, which continues when Type is 0. The warning is a true positive either way, because Type is nonzero by line 250. The new note explains the reason a bit better, but the reported issue is unchanged, so the effect on users is negligible or slightly positive. ---- 29 / 50 ---- Verdict: IMPROVEMENT (high 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/tk/tkerror.c:274:30: style: Condition 'errorPtr->lastRequest!=-1' is always true [knownConditionTrueFalse] Explanation: In Tk, `TkErrorHandler::lastRequest` is an `unsigned long`. Tk sets it to `(unsigned long)-1` to mean that the last request is not yet known. In `lastRequest != -1`, the `-1` converts to ULONG_MAX, so the comparison can be false. main wrongly treated -1 as an impossible value for an unsigned operand and reported the condition as always true. The PR handles signed-to-unsigned conversion in valueflow correctly, so this false positive is gone. ---- 30 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mojoshader/mojoshader_0.0~hg1314+git20250606.93d9d45+dfsg.orig.tar.xz Result: main mojoshader-0.0~hg1314+git20250606.93d9d45/misc/lemon.c:3853:10: style: Condition 'cp==0' is always false [knownConditionTrueFalse] Explanation: Both versions report the same warning at the same place: `cp==0` at line 3853 is always false. `cp` was just assigned `lemp->vardest` inside `else if( lemp->vardest )`, so `cp` cannot be 0 there. This is a true positive in both versions. The main/your pair only reflects a change in the attached error-path notes. The new notes ('Assuming that condition lemp->vardest is not redundant', 'cp is assigned lemp->vardest here') are sensible, but the old notes are not shown, so there is no meaningful difference for users. ---- 31 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mtink/mtink_1.0.16.orig.tar.gz Result: main mtink-1.0.16/chooser/mtinkc.c:548:15: style: Condition '*argv' is always true [knownConditionTrueFalse] Explanation: Inside `while(*argv)`, the check `if (*argv)` at line 548 is always true. The warning is a true positive and is still reported by both versions. The only difference is that the PR's message adds notes: an assumption at 544 and 'Assuming condition is true' at 546. The same main/your pair shows up for ttink.c, so this is a change in message detail, not a removed warning. The richer error path explains the reasoning better, so it is a slight improvement or at worst neutral. ---- 32 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/neverball/neverball_1.6.0+git20180603.orig.tar.xz Result: main neverball-master/share/geom.c:397:9: style: Condition 'draw' is always true [knownConditionTrueFalse] Explanation: item_file() returns &item[g].draw, the address of an array element, so it can never be NULL and 'draw' is always true. Both versions report the same warning. The new version adds a note explaining why: 'Calling function item_file returns !0'. Only the message identity changed (it now carries an error path), and the warning is a true positive either way. The added explanation makes the message more useful, so this is a mild improvement. ---- 33 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/patch/patch_2.8.1.orig.tar.xz Result: main parse-datetime.y:1680:35: style: Condition '!pc->zones_seen' is always false [knownConditionTrueFalse] Explanation: Line 1676 only enters the block when pc->zones_seen is nonzero, so '!pc->zones_seen' on line 1681 is indeed always false. Both versions report the same true positive. The only difference is the new output's error path: it now has notes pointing to the outer condition at 1675/1676 and to the redundant check. The message text is unchanged. The added notes explain why the condition is always false, which makes the warning more informative. The line numbers in the notes are slightly off, probably because of #line mapping in the generated .y file, but this does not affect the warning's validity. ---- 34 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/patch/patch_2.8.1.orig.tar.xz Result: your parse-datetime.y:1680:35: style: Condition '!pc->zones_seen' is always false [knownConditionTrueFalse] parse-datetime.y:1675:24: note: Assuming that condition 'pc->zones_seen' is not redundant parse-datetime.y:1680:35: note: Condition '!pc->zones_seen' is always false Explanation: Both versions report the same true positive. The check at line 1681 sits inside `if (pc && m < n && pc->zones_seen)`, so `!pc->zones_seen` is always false. Only the error-path notes differ. The new notes correctly point to the guarding condition at line 1675/1676. Main's notes are not shown, so there is no clear gain or loss in accuracy for users. ---- 35 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plymouth/plymouth_26.134.222.orig.tar.xz Result: your plymouth-26.134.222/src/libply-splash-core/ply-terminal-emulator.c:1241:75: style: Condition '*input_bytes!='\e'' is always true [knownConditionTrueFalse] plymouth-26.134.222/src/libply-splash-core/ply-terminal-emulator.c:1237:42: note: Assuming that condition '*input_bytes=='\e'' is not redundant plymouth-26.134.222/src/libply-splash-core/ply-terminal-emulator.c:1241:75: note: Condition '*input_bytes!='\e'' is always true Explanation: In the else-if branch, `*input_bytes != '\e'` is reached only after `*input_bytes == '\e'` was false, so the condition really is always true. That makes this a true positive. Main reported the same warning, and the only difference in the diff is that the PR version now carries an error path. The notes point to the earlier `== '\e'` check at line 1237, which tells the user why the condition is always true. Same finding with a more informative trace is a mild improvement, or at worst neutral. ---- 36 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/python-grpc-tools/python-grpc-tools_1.14.1.orig.tar.gz Result: main python-grpc-tools-1.14.1/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc:289:18: style: Condition 'proto_file==kEmptyFile' is always false [knownConditionTrueFalse] Explanation: The same warning is reported at the same location (289:18) by both versions. The pair of lines is most likely a difference in the error path or notes, not a real removal. The condition at line 289 really is always false, because line 279 already returned when proto_file==kEmptyFile. So the true positive is still reported, and the change does not matter to users. ---- 37 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qt6-quickeffectmaker/qt6-quickeffectmaker_6.11.2.orig.tar.xz Result: main qtquickeffectmaker-everywhere-src-6.11.2/tools/qqem/nodeview.cpp:358:18: style: Condition 'node' is always true [knownConditionTrueFalse] Explanation: The function returns early when `!node`, so the ternary `node ? ... : -1` at line 358 is always true. The warning is a true positive, and it is still reported with the PR. Only the text changed: the new version adds error-path notes pointing at the `if (!node)` check at line 355. That makes the message easier to understand. ---- 38 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qt6-quickeffectmaker/qt6-quickeffectmaker_6.11.2.orig.tar.xz Result: your qtquickeffectmaker-everywhere-src-6.11.2/tools/qqem/nodeview.cpp:358:18: style: Condition 'node' is always true [knownConditionTrueFalse] qtquickeffectmaker-everywhere-src-6.11.2/tools/qqem/nodeview.cpp:355:9: note: Assuming that condition '!node' is not redundant qtquickeffectmaker-everywhere-src-6.11.2/tools/qqem/nodeview.cpp:358:18: note: Condition 'node' is always true Explanation: The warning is a true positive either way. `if (!node) return;` on line 355 guarantees that `node` is non-null at line 358, so `node ? ... : -1` is always true. Main reported the same warning without explanation notes. The PR adds an error path pointing to the guarding condition at 355 ('Assuming that condition '!node' is not redundant'), which makes the message more informative. Because of the 'Assuming' wording it reads like a conditional warning, but here the early return proves it outright. Overall the message is slightly more helpful. ---- 39 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/renpy/renpy_8.3.4+dfsg.orig.tar.xz Result: your renpy-8.3.4-source/module/tinyfiledialogs/tinyfiledialogs.c:7223:22: style: Condition '!p' is always false [knownConditionTrueFalse] renpy-8.3.4-source/module/tinyfiledialogs/tinyfiledialogs.c:7221:9: note: Assignment 'p=lBuff', assigned value is never 0 renpy-8.3.4-source/module/tinyfiledialogs/tinyfiledialogs.c:7223:22: note: Condition '!p' is always false Explanation: Line 7221 assigns `p = lBuff`, where `lBuff` is a local array, so `!p` at line 7223 is always false. The warning is a true positive both before and after the PR. The only difference is that the PR's version adds an error path ('Assignment p=lBuff, assigned value is never 0'). That makes the message easier to understand and more accurate, so it is a minor improvement. ---- 40 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/roaraudio/roaraudio_1.0~beta12.orig.tar.gz Result: main roaraudio-1.0beta12/roard/output.c:360:38: style: Condition 'strcmp(k,"recsource")==0' is always false [knownConditionTrueFalse] Explanation: The warning at line 360 is reported by both main and the PR. Only the extra note lines differ, which shows up as a paired main/your entry. The duplicate `strcmp(k, "recsource") == 0` check at line 360 really is always false, because line 354 already handles that case. So this true positive is kept, and the PR now adds supporting notes to the message. There is no meaningful change for users. ---- 41 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sfst/sfst_1.7.0.orig.tar.gz Result: main sfst-1.7.0/src/robust.cpp:297:30: style: Condition 'cs.position==input.size()' is always false [knownConditionTrueFalse] Explanation: Line 297 sits in the else branch of `if (cs.position == input.size())` at line 262. Nothing in between changes `cs.position`, so `cs.position == input.size()` is indeed always false there. The warning is a true positive and is still reported. The only difference is that the new output adds an error path note pointing to the guarding condition at line 262. That makes the diagnostic easier to understand, so this is a slight improvement in message quality. ---- 42 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sockstat/sockstat_0.4.2.orig.tar.gz Result: main sockstat/sockstat.c:489:3: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour. See condition at line 487. [shiftTooManyBitsSigned] sockstat/sockstat.c:487:24: note: Assuming that condition 'port>65535' is not redundant sockstat/sockstat.c:489:3: note: Shift Explanation: SET_PORT is very likely the FreeBSD sockstat macro `ports[p / INT_BIT] |= 1 << (p % INT_BIT)` with INT_BIT == 32. The macro definition is not shown, so this is inferred. For valid ports such as 31 or 65535, `p % 32` is 31, so the code evaluates `1 << 31` on a signed int. In C that is undefined behaviour, which makes the shiftTooManyBitsSigned warning a true positive. The value is reachable after the range check (65535 % 32 == 31), and the warning's own note relies on exactly that bound. The PR changes how range bounds and shift-count values are computed, and it now drops the warning, so a real issue is no longer reported. ---- 43 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/stalonetray/stalonetray_0.8.3.orig.tar.gz Result: main stalonetray-0.8.3/src/kde_tray.c:50:22: style: Condition 'n_old_kde_icons!=-1' is always true [knownConditionTrueFalse] Explanation: `n_old_kde_icons` is an `unsigned long` global initialised to -1, i.e. ULONG_MAX. It is also updated through a pointer in `x11_get_root_winlist_prop`. In `n_old_kde_icons != -1`, the -1 is converted to unsigned long, so the comparison checks against ULONG_MAX, and that value is reachable (it is the initial value). The condition is therefore not always true. The old warning most likely came from treating 'unsigned is never negative' as making != -1 always true, without applying the implicit conversion. The PR adds conversion-aware handling of such values, so removing this false positive is correct. ---- 44 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/syrthes/syrthes_4.3.5+20200129-dfsg1.orig.tar.gz Result: main syrthes-4.3.5+20200129-dfsg1/src/syrthes-ppfunc/test/user_fct.c:75:40: style: Condition 'nr==12' is always false [knownConditionTrueFalse] Explanation: The warning is still reported. The PR did not remove it; the main and your lines are the same warning, and the new output adds error-path notes ('Assuming that condition nr==12 is not redundant' at line 72). The warning itself is a true positive: nr==12 was already handled by the earlier else-if at line 72, so at line 75 it is always false. The extra notes make the message more informative for users. ---- 45 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tarantool/tarantool_2.6.0.orig.tar.gz Result: main tarantool_2.6.0/third_party/zstd/lib/compress/zstd_lazy.c:688:40: style: Condition 'repLength>=4' is always true [knownConditionTrueFalse] tarantool_2.6.0/third_party/zstd/lib/compress/zstd_lazy.c:685:116: note: Assignment 'repLength=ZSTD_count_2segments(ip+4,repMatch+4,iend,repEnd,prefixStart)+4', assigned value is greater than 3 tarantool_2.6.0/third_party/zstd/lib/compress/zstd_lazy.c:688:40: note: Condition 'repLength>=4' is always true Explanation: `repLength` is computed as `ZSTD_count_2segments(...) + 4`. That function returns a byte count bounded by the input buffer, so the result can never come close to SIZE_MAX. Wrap-around is impossible in practice, and `repLength >= 4` really is always true. The old warning flagged a genuinely redundant check. The PR drops it because it now refuses to propagate range bounds through unsigned `+` unless it can prove the addition does not wrap, and here the operand's range is unknown. That is more conservative in theory, but it loses a valid redundant-condition finding. The same warning also disappears at lines 483, 502 and 658. ---- 46 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/t/tea/tea_63.3.1.orig.tar.gz Result: main psemiletov-tea-qt-9599b12/src/zip.c:283:11: style: Condition 'c' is always true [knownConditionTrueFalse] Explanation: The main line and the your line report the same warning at the same location with the same text. Only the verbose notes differ in the diff output. Inside `while ((c = *name++))`, `c` is non-zero, so `if (c)` on line 283 is indeed always true. This is a true positive in both versions, so the change does not matter to users. ---- 47 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/u/ukui-control-center/ukui-control-center_4.20.0.4.orig.tar.gz Result: main ukui-control-center-4.20.0.4/plugins/devices/touchpad/touchpad.cpp:106:21: style: Condition 'device_info!=nullptr' is always true [knownConditionTrueFalse] Explanation: The PR did not add or remove this warning. It only changed the error path notes. The warning at line 106 is still a true positive, because device_info was already checked against nullptr at line 92 with an early return. The 'main' line is half of a text pair, and the 'your' line shows the same message with notes (lines 92 and 101). The new note 'Assuming condition is false' at line 101 refers to the unrelated condition 'device != nullptr', which is slightly odd but harmless. For users the warning itself is unchanged. ---- 48 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/u/upse/upse_1.0.0.orig.tar.gz Result: your upse-1.0.0/src/libupse/upse_ps1_bios_base.c:304:23: style: Condition 'pcA1!=NULL' is always true [knownConditionTrueFalse] upse-1.0.0/src/libupse/upse_ps1_bios_base.c:301:30: note: Assuming that condition 'pcA1==NULL' is not redundant upse-1.0.0/src/libupse/upse_ps1_bios_base.c:304:23: note: Condition 'pcA1!=NULL' is always true Explanation: After the early return at line 301 when pcA1 == NULL, the check 'pcA1 != NULL' at line 304 is always true, so the warning is a true positive both before and after the PR. The PR changes only the error path: it now adds the note 'Assuming that condition pcA1==NULL is not redundant', which points to the earlier check that makes the later one redundant. This makes the message more informative. ---- 49 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/v/vte/vte_0.28.2.orig.tar.xz Result: main vte-0.28.2/src/vtestream-file.h:37:7: style: Condition 'ret==(gsize)-1' is always false [knownConditionTrueFalse] Explanation: `read()` returns `ssize_t`, and -1 on error. That value is stored in `gsize ret` (unsigned), so `ret == (gsize)-1` is exactly how this code detects a read error, and the condition can be true. Main wrongly said it is always false, probably because it mishandled the signed-to-unsigned conversion of the -1 value or the impossible ranges. The PR reworks these conversions (`truncateValues`, `isValueRangePreservingConversion`, cast handling), which removes this false positive. ---- 50 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/x/xfdesktop4/xfdesktop4_4.20.2.orig.tar.bz2 Result: your xfdesktop-4.20.2/src/xfdesktop-file-icon-manager.c:2103:54: style: Condition 'file_icon==fmanager->desktop_icon' is always false [knownConditionTrueFalse] xfdesktop-4.20.2/src/xfdesktop-file-icon-manager.c:2059:22: note: Assuming that condition 'file_icon==fmanager->desktop_icon' is not redundant xfdesktop-4.20.2/src/xfdesktop-file-icon-manager.c:2103:54: note: Condition 'file_icon==fmanager->desktop_icon' is always false Explanation: Both versions report the same knownConditionTrueFalse at line 2103; the PR only adds an error path. The ternary at 2103 sits in the else branch of what looks like an `if` at line 2059 that tests the same condition, `file_icon == fmanager->desktop_icon`. In that branch the comparison is always false, so the warning is a true positive. The new notes point to the guarding condition, which makes the diagnostic easier to understand without changing its correctness.