AI review of 2026-11-30_03-29-06-d6395985015f-results.txt PR: #9090 https://github.com/cppcheck-opensource/cppcheck/pull/9090 Tested: d6395985015f91d567de35df0dcf0814382ac019 Merge base: edf0fd603c53345d4a5b750d9ac12264e69c1442 Reviewed: 2026-12-01 08:36:34 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 241 in the report (random sample), 1 not reviewed: valueFlowMaxIterations Verdicts: 6 acceptable regression, 25 improvement, 5 neutral, 12 regression, 2 unclear Tokens: 119211 input, 764760 cache read, 191190 cache write, 37515 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/a/apngopt/apngopt_1.4.orig.tar.xz Result: your zopfli/deflate.c:575:41: warning: Possible null pointer dereference: splitpoints [nullPointer] zopfli/deflate.c:561:25: note: Assignment 'splitpoints=0', assigned value is 0 zopfli/deflate.c:563:13: note: Assuming condition is false zopfli/deflate.c:565:20: note: Assuming condition is true zopfli/deflate.c:575:41: note: Null pointer dereference Explanation: The new warning is a false positive. On the path where `btype == 1`, `splitpoints` stays 0 and `npoints` stays 0. The loop then runs only for `i == 0`. On line 574, `i == 0` selects `instart`, and on line 575, `i == npoints` selects `inend`, so `splitpoints` is never indexed. On the other paths, `splitpoints` is set by the split functions. The PR's new path handling makes Cppcheck lose the link between `npoints` and the ternary guards. ---- 2 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/apriltag/apriltag_3.4.5.orig.tar.gz Result: your apriltag-3.4.5/common/postscript_utils.h:52:13: warning: If resource allocation fails, then there is a possible null pointer dereference: f [nullPointerOutOfResources] apriltag-3.4.5/apriltag_quad_thresh.c:1951:24: note: Assuming allocation function fails apriltag-3.4.5/apriltag_quad_thresh.c:1951:24: note: Assignment 'f=fopen("debug_lines.ps","w")', assigned value is 0 apriltag-3.4.5/apriltag_quad_thresh.c:1964:26: note: Calling function 'postscript_image', 1st argument 'f' value is 0 apriltag-3.4.5/common/postscript_utils.h:52:13: note: Null pointer dereference Explanation: In apriltag_quad_thresh.c (debug code), `f = fopen("debug_lines.ps", "w")` is never checked for NULL and is then passed to `postscript_image()`. That function calls `fprintf(f, ...)` unconditionally on every line, including line 52. If fopen fails, f is still NULL at line 52, so the new nullPointerOutOfResources warning is technically correct. The PR only lets the null value be tracked past the nested loop that contains an `if`, where it used to be lost. Earlier dereferences in the same function are probably already reported, so this adds little, but it is a true positive and not a false one. ---- 3 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/a/astrometry.net/astrometry.net_0.98+dfsg.orig.tar.xz Result: your astrometry.net-0.98/solver/solvedfile.c:129:13: warning: If memory allocation fails, then there is a possible null pointer dereference: map [nullPointerOutOfMemory] astrometry.net-0.98/solver/solvedfile.c:120:15: note: Assuming allocation function fails astrometry.net-0.98/solver/solvedfile.c:120:15: note: Assignment 'map=mmap(NULL,end,PROT_READ,MAP_SHARED,fileno(f),0)', assigned value is 0 astrometry.net-0.98/solver/solvedfile.c:129:13: note: Null pointer dereference Explanation: The new warning is a false positive. On failure `mmap` returns `MAP_FAILED` (`(void*)-1`), not NULL. The code checks `map == MAP_FAILED` and returns early, so `map[i]` at line 129 is never a failed mapping. With a NULL address hint, `mmap` does not return 0 in practice either. The PR changed how paths are carried past the if, and the modelled null value from the allocation now reaches the loop. ---- 4 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/astrometry.net/astrometry.net_0.98+dfsg.orig.tar.xz Result: your astrometry.net-0.98/solver/solvedfile.c:137:12: warning: If memory allocation fails, then there is a possible null pointer dereference: map [nullPointerOutOfMemory] astrometry.net-0.98/solver/solvedfile.c:120:15: note: Assuming allocation function fails astrometry.net-0.98/solver/solvedfile.c:120:15: note: Assignment 'map=mmap(NULL,end,PROT_READ,MAP_SHARED,fileno(f),0)', assigned value is 0 astrometry.net-0.98/solver/solvedfile.c:137:12: note: Null pointer dereference Explanation: mmap() signals failure by returning MAP_FAILED, not NULL, and the code checks `map == MAP_FAILED` and returns. With a NULL address hint, mmap does not return 0 on success, so `map` cannot be null at `munmap(map, end)`. The "allocation fails, value 0" assumption does not match how mmap works. This new nullPointerOutOfMemory warning, which appears only with the PR's changed path handling, is a false positive. ---- 5 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bzflag/bzflag_2.4.30.orig.tar.gz Result: main bzflag-2.4.30/src/bzfs/bzfsAPI.cxx:2798:9: style: Condition 'gkPlayer' is always true [knownConditionTrueFalse] Explanation: The `else //invald player return false;` at line 2795 shows that the enclosing `if` checks the player pointer. That `if` most likely tests `gkPlayer` itself; its start is not shown. Every other path inside the block either sets `fi` or returns, so `gkPlayer` is non-null at line 2798 and the `gkPlayer &&` test is redundant. The removed warning was therefore a true positive, and losing it is a new false negative. It probably comes from the reworked path splitting through the nested if/else blocks with returns and the loop with `break`. ---- 6 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bzflag/bzflag_2.4.30.orig.tar.gz Result: main bzflag-2.4.30/src/bzfs/commands.cxx:1671:13: style: Condition 'gkPlayer' is always true [knownConditionTrueFalse] Explanation: The else block at 1662-1669 reports 'could not find player' and returns, so the enclosing if almost certainly tested gkPlayer for non-null. Every path that reaches line 1671 therefore has gkPlayer non-null, and 'gkPlayer' in 'if (gkPlayer && fi)' is redundant. Main's warning looks like a true positive (only 'fi' matters there). The PR removes it, probably because the new path splitting in the nested flag-lookup branches loses the known value. That is a new false negative, not a removed false positive. Confidence is medium because the start of the enclosing if is not shown. ---- 7 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/bzflag/bzflag_2.4.30.orig.tar.gz Result: main bzflag-2.4.30/src/obstacle/MeshSceneNodeGenerator.cxx:453:13: style: Condition '!gotSpecifiedTexture' is always true [knownConditionTrueFalse] bzflag-2.4.30/src/obstacle/MeshSceneNodeGenerator.cxx:424:32: note: Assignment 'gotSpecifiedTexture=false', assigned value is 0 bzflag-2.4.30/src/obstacle/MeshSceneNodeGenerator.cxx:436:9: note: Assuming condition is false bzflag-2.4.30/src/obstacle/MeshSceneNodeGenerator.cxx:453:13: note: Condition '!gotSpecifiedTexture' is always true Explanation: `gotSpecifiedTexture` starts as false and is set to true at line 431 when `userTexture` is set and `faceTexture >= 0`. At line 453, `!gotSpecifiedTexture` is only evaluated when `userTexture && mat->getUseColorOnTexture(0)` is false. That includes the case where `userTexture` is true, `getUseColorOnTexture(0)` is false and the texture was found, so `!gotSpecifiedTexture` can be false. The 'always true' warning was a false positive: main lost the path through the inner `if` that sets the flag. The PR tracks the paths that part at an undecided `if` more accurately, so removing this warning is an improvement. ---- 8 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bzflag/bzflag_2.4.30.orig.tar.gz Result: main bzflag-2.4.30/src/ogl/OpenGLUtils.cxx:108:9: style: Condition 'useDiffuseColor' is always true [knownConditionTrueFalse] bzflag-2.4.30/src/ogl/OpenGLUtils.cxx:50:28: note: Assignment 'useDiffuseColor=true', assigned value is 1 bzflag-2.4.30/src/ogl/OpenGLUtils.cxx:99:29: note: Assuming condition is false bzflag-2.4.30/src/ogl/OpenGLUtils.cxx:108:9: note: Condition 'useDiffuseColor' is always true Explanation: `useDiffuseColor` starts as true at line 50. In bzflag, the texturing block that follows (lines 51-95, partly shown) sets it from `bzmat->getUseColorOnTexture()` when a texture is found. The comment in the else branch (lines 115-117) confirms that the false case is intended for user textures. So the condition at line 108 is not always true. The old warning came from main losing track of the path that changes the variable inside the nested ifs. The odd 'Assuming condition is false' note on the unrelated lighting condition at line 99 points the same way. The PR fixes this kind of path merging, so removing the warning removes a false positive. ---- 9 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/composable-kernel/composable-kernel_7.2.4.orig.tar.gz Result: main composablekernel/test/ck_tile/topk_softmax/test_topk_softmax.hpp:267:26: style: Condition 'rtn' is always true [knownConditionTrueFalse] composablekernel/test/ck_tile/topk_softmax/test_topk_softmax.hpp:221:16: note: Assignment 'rtn=true', assigned value is 1 composablekernel/test/ck_tile/topk_softmax/test_topk_softmax.hpp:267:26: note: Condition 'rtn' is always true Explanation: `rtn` is set to true at line 221, but inside the validation block it is updated in the loop with `rtn &= ck_tile::check_err(...)`. `check_err` can return false, so `rtn` can be false at line 267 and the condition is not always true. The removed knownConditionTrueFalse warning was a false positive. It likely came from the old fork handling, where the throwing else branch of the activation if/else let a stale known value carry on past the block. The PR's better tracking of which paths reach the end of the block removes it. ---- 10 / 50 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ctsim/ctsim_7.0.0.orig.tar.gz Result: main ctsim-7.0.0/libctgraphics/ezplot.cpp:815:23: style: Condition 'y_added_ticks<0' is always false [knownConditionTrueFalse] ctsim-7.0.0/libctgraphics/ezplot.cpp:806:26: note: Assignment 'y_added_ticks=0', assigned value is 0 ctsim-7.0.0/libctgraphics/ezplot.cpp:812:14: note: Assuming condition is true ctsim-7.0.0/libctgraphics/ezplot.cpp:815:23: note: Condition 'y_added_ticks<0' is always false Explanation: y_added_ticks is initialised to 0 at line 806 and can only be set to 0 again at line 810, so at line 815 'y_added_ticks < 0' really is always false. Main's warning is a true positive. The PR's new path forking and joining in the forward analysis loses this known value, so removing the warning is a new false negative. ---- 11 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/far2l/far2l_2.9.1~beta+ds.orig.tar.xz Result: your far2l-v_2.9.1/farlng/src/lng.generator.cpp:367:8: warning: If memory allocation fails, then there is a possible null pointer dereference: pLangEntries [nullPointerOutOfMemory] far2l-v_2.9.1/farlng/src/lng.generator.cpp:326:42: note: Assuming allocation function fails far2l-v_2.9.1/farlng/src/lng.generator.cpp:326:19: note: Assignment 'pLangEntries=(LanguageEntry*)malloc(dwLangs*sizeof(LanguageEntry))', assigned value is 0 far2l-v_2.9.1/farlng/src/lng.generator.cpp:367:8: note: Null pointer dereference Explanation: The warning is the same as before. Only the error path changed: the step 'Assuming condition is true' at line 358 (bWriteCopyright) is gone. The dereference at line 367 happens whether or not 'if (bWriteCopyright)' is taken, so that condition is irrelevant to the null pointer. The new path is more accurate. The warning itself is valid: malloc can fail and the result is not checked. Note that pLangEntries[i] is already dereferenced earlier at line 331, so this report is redundant, but that was true before the PR as well. ---- 12 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/filament/filament_1.9.25+dfsg3.orig.tar.xz Result: main filament-1.9.25/third_party/spirv-tools/source/opt/scalar_replacement_pass.cpp:145:10: style: Condition '!dead.empty()' is always true [knownConditionTrueFalse] filament-1.9.25/third_party/spirv-tools/source/opt/scalar_replacement_pass.cpp:135:7: note: Assuming condition is true filament-1.9.25/third_party/spirv-tools/source/opt/scalar_replacement_pass.cpp:145:10: note: Condition '!dead.empty()' is always true Explanation: Line 145 is a `while (!dead.empty())` loop, and its body calls `dead.pop_back()` until the vector is empty. The condition is therefore false on the final evaluation and is not always true. It is true on the first check, after `dead.push_back(inst)` at line 136 and the early return at line 142, but that does not make the loop condition constant. The removed knownConditionTrueFalse warning was a false positive, so removing it helps users. ---- 13 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/f/flog/flog_1.8+orig.orig.tar.gz Result: your flog-1.8/flog.c:54:9: style: Variable 'eol' can be declared as pointer to const [constVariablePointer] Explanation: The new constVariablePointer warning is reported on the declaration of 'eol' at line 54, but the code that uses 'eol' is not shown. In flog, 'eol' is probably the memchr() result for the end of a line. It may be used only for reading, or it may be written through or assigned to the non-const 'pos'; the shown snippet does not tell which. The pull request only changes the forward value-flow path splitting, so the warning appears through a side effect of different value-flow results. That could be a correct new detection or a false positive caused by a lost value or lifetime. Without the uses of 'eol', the warning cannot be confirmed or rejected. ---- 14 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/freefem++/freefem++_4.17+dfsg.orig.tar.xz Result: your FreeFem-sources-4.17/src/fflib/problem.cpp:4575:13: style: Condition 'where_in_stack' is always false [knownConditionTrueFalse] FreeFem-sources-4.17/src/fflib/problem.cpp:4433:13: note: Assuming that condition 'where_in_stack' is not redundant FreeFem-sources-4.17/src/fflib/problem.cpp:4480:21: note: Assuming condition is true FreeFem-sources-4.17/src/fflib/problem.cpp:4575:13: note: Condition 'where_in_stack' is always false Explanation: The new warning says `if (where_in_stack) delete [] where_in_stack;` at line 4575 is always false. Its own trace starts from an earlier condition on `where_in_stack` at line 4433, which only makes sense if the pointer can be non-null there. The value 0 is then followed through one assumed branch (line 4480, 'Assuming condition is true') to line 4575. That is one path out of several through a long function with many branches, not a fact that holds on all of them. A null check before `delete[]` on a pointer that is conditionally allocated is ordinary code, so 'always false' is almost certainly wrong. The PR changes how forked paths go on past undecided ifs (`replaceWith`, split paths), and that fits a value from one path being treated as known for the whole function. This is a new false positive. The lines around 4433 and 4480 are not shown, so confidence is not high. ---- 15 / 50 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/f/freewheeling/freewheeling_0.6.6.orig.tar.gz Result: main freewheeling-0.6.6/src/fweelin_browser.cc:830:16: style: Condition 'my>=xpand_y1' is always true [knownConditionTrueFalse] freewheeling-0.6.6/src/fweelin_browser.cc:757:10: note: Assuming that condition 'my>=xpand_y1' is not redundant freewheeling-0.6.6/src/fweelin_browser.cc:806:14: note: Assuming condition is true freewheeling-0.6.6/src/fweelin_browser.cc:818:28: note: Assuming condition is true freewheeling-0.6.6/src/fweelin_browser.cc:830:16: note: Condition 'my>=xpand_y1' is always true Explanation: The PR removed a knownConditionTrueFalse warning at line 830 that main derived from the condition at line 757. Line 757 is not shown. The comment 'Mouse in border region' and the bounds checks suggest an enclosing check that the mouse lies inside the expanded window (my >= xpand_y1 ... my <= xpand_y2). If so, 'my >= xpand_y1' really is always true at line 830, and the removed warning was a true positive. The PR changes how forked paths are carried past ifs (here the if at 818), which plausibly dropped the known value on this path, making this a new false negative. Without the code at line 757 this cannot be confirmed. ---- 16 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gatling/gatling_0.13.orig.tar.bz2 Result: your gatling-0.13/mmapbench.c:80:12: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] gatling-0.13/mmapbench.c:72:13: note: Assuming allocation function fails gatling-0.13/mmapbench.c:72:13: note: Assignment 'p=mmap(NULL,count*8192,PROT_READ,MAP_SHARED,fd,0)', assigned value is 0 gatling-0.13/mmapbench.c:80:12: note: Null pointer dereference Explanation: mmap() signals failure with MAP_FAILED, not NULL, and the code checks `p==MAP_FAILED` and returns before the loop. Assuming mmap returns 0 on failure is wrong, so the new nullPointerOutOfMemory warning on `p[i*8192]` is a false positive. The PR's path-splitting changes let this value reach the dereference where main did not report it. ---- 17 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gatling/gatling_0.13.orig.tar.bz2 Result: your gatling-0.13/mmapbench.c:81:12: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] gatling-0.13/mmapbench.c:72:13: note: Assuming allocation function fails gatling-0.13/mmapbench.c:72:13: note: Assignment 'p=mmap(NULL,count*8192,PROT_READ,MAP_SHARED,fd,0)', assigned value is 0 gatling-0.13/mmapbench.c:81:12: note: Null pointer dereference Explanation: This is a new false positive. `mmap()` reports failure by returning `MAP_FAILED`, not NULL, and the code checks `p==MAP_FAILED` and returns right after the call. So the premise that 'the allocation fails, p is 0' is wrong. Line 81 also only passes `p` to `munmap()`, which is not a null pointer dereference anyway. The changed path handling now lets the assumed-null value reach this line. ---- 18 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/getfem/getfem_5.5+dfsg1.orig.tar.xz Result: main getfem-5.5/contrib/opt_assembly/opt_assembly.cc:511:14: style: Condition 'select' is always true [knownConditionTrueFalse] getfem-5.5/contrib/opt_assembly/opt_assembly.cc:461:17: note: Assignment 'select=true', assigned value is 1 getfem-5.5/contrib/opt_assembly/opt_assembly.cc:511:14: note: Condition 'select' is always true Explanation: The notes show the local flags are initialized as `all = false` and `select = true` around lines 460–461. Nothing in the shown code assigns them afterwards; the blocks in between only run test macros. So at line 511 `all` is still false and `select` is still true, and main's knownConditionTrueFalse warnings are true positives, even if they are probably intentional debug switches. The PR reworks how forward analysis handles paths that part at undecided ifs. It now stops tracking the values somewhere in the macro-heavy blocks before line 511, losing both warnings. That is a new false negative, not a removed false positive. ---- 19 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/getfem/getfem_5.5+dfsg1.orig.tar.xz Result: main getfem-5.5/contrib/opt_assembly/opt_assembly.cc:511:7: style: Condition 'all' is always false [knownConditionTrueFalse] getfem-5.5/contrib/opt_assembly/opt_assembly.cc:460:14: note: Assignment 'all=false', assigned value is 0 getfem-5.5/contrib/opt_assembly/opt_assembly.cc:511:7: note: Condition 'all' is always false Explanation: At line 460 the local flag 'all' is set to false (and 'select' to true at 461). These look like configuration flags that the visible code between there and line 511 only reads, never writes; the tests and macros use them only in conditions. So 'all' really is always false at line 511, and main's knownConditionTrueFalse warning was a true positive. The PR changes how paths are tracked through undecided branches; here it apparently loses the known value across the earlier blocks and macro expansions, so the warning disappears. That is a new false negative, not a removed false positive. Confidence is medium because lines 455-470 and the macro bodies are not shown. ---- 20 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnome-connections/gnome-connections_51.0.orig.tar.xz Result: main gnome-connections-51.0/subprojects/gtk-frdp/src/frdp-session.c:1170:7: style: Condition '!keyboard_layout_set' is always true [knownConditionTrueFalse] gnome-connections-51.0/subprojects/gtk-frdp/src/frdp-session.c:1134:48: note: Assignment 'keyboard_layout_set=0', assigned value is 0 gnome-connections-51.0/subprojects/gtk-frdp/src/frdp-session.c:1170:7: note: Condition '!keyboard_layout_set' is always true Explanation: 'keyboard_layout_set' starts as FALSE, but the loop sets it to TRUE at line 1157 when a layout matches. The loop runs only inside the nested ifs (source != NULL, schema != NULL, layout != NULL). So '!keyboard_layout_set' at line 1170 is not always true. The old warning was a false positive: main lost the path through the loop that sets the flag. The PR follows the paths through nested blocks more accurately, and the false positive is gone. ---- 21 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/guile-3.0/guile-3.0_3.0.11.orig.tar.xz Result: your guile-3.0-3.0.11.orig/lib/localcharset.c:1262:13: warning: Uninitialized variable: codeset [uninitvar] guile-3.0-3.0.11.orig/lib/localcharset.c:1178:22: note: Assuming condition is true guile-3.0-3.0.11.orig/lib/localcharset.c:1183:15: note: Assuming condition is true guile-3.0-3.0.11.orig/lib/localcharset.c:1190:24: note: Assuming condition is false guile-3.0-3.0.11.orig/lib/localcharset.c:1192:30: note: Assuming condition is false guile-3.0-3.0.11.orig/lib/localcharset.c:1262:13: note: Uninitialized variable: codeset Explanation: `codeset` is assigned on every path before line 1262. In the gnulib/guile `locale_charset()` the locale-table lookup either sets `codeset = table[mid].canonical` and jumps with `goto done_table_lookup`, or reaches the `if (0) ... else { codeset = locale; }` construct, which also sets it. The later alias lookup only reads `codeset` after that, so line 1262 cannot read an uninitialized value. Main already reported this, but only through the old `legacyUninitvar` checker. With the PR, the ValueFlow-based `uninitvar` now reports it too, with an 'Assuming condition...' path that does not exist. That suppresses the legacy message. The changed forward analysis lets an uninitialized value through the goto/branch handling. So the PR adds a new ValueFlow false positive with a misleading trace. The user still sees a false positive (now as a warning instead of an error), and the analysis understands this code worse. ---- 22 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gvfs/gvfs_1.62.0.orig.tar.xz Result: main gvfs-1.62.0/daemon/ParseFTPList.c:915:9: style: Variable 'p' is assigned an expression that holds the same value. [redundantAssignment] gvfs-1.62.0/daemon/ParseFTPList.c:885:9: note: p is assigned '&(line[toklen[0]])' here. gvfs-1.62.0/daemon/ParseFTPList.c:896:28: note: Assuming condition is true gvfs-1.62.0/daemon/ParseFTPList.c:915:9: note: Variable 'p' is assigned an expression that holds the same value. Explanation: The redundantAssignment warning at line 915 is still reported with the same text. It is a true positive: `p = &(line[toklen[0]])` is assigned at line 885 and is not changed before the identical assignment at line 915. Only the error path changed: it now has an extra correct note, "Assuming condition is true" for `if (lstyle == 'O')` at line 910. This comes from the new path splitting in the forward analysis. The extra note is accurate but adds little, because the redundancy does not depend on either condition. For users the change does not matter. ---- 23 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/inhomog/inhomog_0.1.9.2.orig.tar.gz Result: your inhomog-0.1.9.2/lib/scale_factor_D_Ham.c:482:36: style: Condition 'n_a_D_dot_squared-1>1' is always true [knownConditionTrueFalse] inhomog-0.1.9.2/lib/scale_factor_D_Ham.c:432:30: note: Assuming that condition 'n_a_D_dot_squared<50' is not redundant inhomog-0.1.9.2/lib/scale_factor_D_Ham.c:482:36: note: Condition 'n_a_D_dot_squared-1>1' is always true Explanation: The warning at line 482 is still reported. The only change is in its error path: the note 'Assuming condition is true' at line 477 is gone. That condition, `a_D_dot_squared[0] <= 0`, does not involve `n_a_D_dot_squared`. Both of its branches only change `n_neg_square`/`n_pos_square`, so it has nothing to do with whether `n_a_D_dot_squared-1 > 1` holds. The PR now walks both outcomes of that if and joins them instead of carrying the then-path assumption forward. The resulting path is shorter and more accurate. Whether the warning itself is correct depends on code not shown (line 432), but it is the same in both versions. ---- 24 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/ircd-irc2/ircd-irc2_2.11.2p3~dfsg.orig.tar.gz Result: main irc2.11.2p3/ircd/s_bsd.c:1169:6: style: Condition '!hp' is always true [knownConditionTrueFalse] irc2.11.2p3/ircd/s_bsd.c:1127:6: note: Assuming that condition 'hp' is not redundant irc2.11.2p3/ircd/s_bsd.c:1169:6: note: Condition '!hp' is always true Explanation: Line 1127 checks `if (hp)` and then runs a loop over hp's names. That loop only breaks out of itself, so both paths (hp null and hp non-null) continue past it. Nothing between there and line 1169 makes hp known to be null. In the code, `if (!hp)` at 1169 is a genuine two-way check with an else branch that uses `hp->h_addr_list`. Main's 'always true' message took the hp==0 value from the earlier condition as known after the if, so it was a false positive. The PR's better handling of paths that leave a block removes it. ---- 25 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/konversation/konversation_26.08.3.orig.tar.xz Result: your konversation-26.08.3/src/irc/outputfilter.cpp:623:16: warning: Uninitialized variables: result.type, result.type [uninitvar] konversation-26.08.3/src/irc/outputfilter.cpp:612:41: note: Assuming condition is true konversation-26.08.3/src/irc/outputfilter.cpp:616:41: note: Assuming condition is true konversation-26.08.3/src/irc/outputfilter.cpp:623:16: note: Uninitialized variables: result.type, result.type Explanation: Main already reported this uninitvar at line 623. The PR only changes its text: it now names the same member twice ('result.type, result.type'). The new error path is also contradictory: it assumes the condition at 612 is true and then the condition at 616 is true, but 616 is an else-if that is never evaluated when 612 holds. Whether or not the underlying warning is valid, the message and path became less accurate. This looks like a side effect of the new path splitting reporting the same value twice. ---- 26 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/liba/libaqbanking/libaqbanking_6.9.2.orig.tar.gz Result: main aqbanking-6.9.2/src/libs/plugins/backends/aqebics/client/p_tools.c:1626:7: style: Condition '!useBankKey' is always true [knownConditionTrueFalse] aqbanking-6.9.2/src/libs/plugins/backends/aqebics/client/p_tools.c:1560:7: note: Assuming that condition 'useBankKey' is not redundant aqbanking-6.9.2/src/libs/plugins/backends/aqebics/client/p_tools.c:1621:9: note: Assuming condition is false aqbanking-6.9.2/src/libs/plugins/backends/aqebics/client/p_tools.c:1626:7: note: Condition '!useBankKey' is always true Explanation: The warning claims `useBankKey` is always false at line 1626, which would mean every path through the `if (useBankKey)` block at line 1560 returns. That block is not fully shown. Judging from the visible tail of the analogous key branch (lines 1586-1606), it returns only when the keys are missing and otherwise falls through. So the useBankKey-true path can reach line 1626, and the condition is not always true. This is the #15264 pattern the PR fixes: main let a stopping sub-path (the return) stand for the whole block. Removing the warning removes a false positive. ---- 27 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/liba/libaqbanking/libaqbanking_6.9.2.orig.tar.gz Result: main aqbanking-6.9.2/src/libs/plugins/parsers/swift/swift940_86.c:364:10: style: Condition 'isRealSepaTag' is always false [knownConditionTrueFalse] aqbanking-6.9.2/src/libs/plugins/parsers/swift/swift940_86.c:307:21: note: Assignment 'isRealSepaTag=0', assigned value is 0 aqbanking-6.9.2/src/libs/plugins/parsers/swift/swift940_86.c:315:16: note: Assuming condition is false aqbanking-6.9.2/src/libs/plugins/parsers/swift/swift940_86.c:364:10: note: Condition 'isRealSepaTag' is always false Explanation: `isRealSepaTag` starts as 0 (line 307). It is set to 1 at line 347, inside the then block of the `if` at line 315, when tagLen>0. The warning at line 364 only follows the path where the line-315 condition is false; on the then path the value can be 1. So `isRealSepaTag` is not always false and the warning was a false positive. It matches the #15264 pattern the PR fixes: only some paths through a nested `if` change the value, and main wrongly assumed the outer condition is false past the block. Removing the warning is an improvement. ---- 28 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libv/libvpx/libvpx_1.17.0.orig.tar.gz Result: main libvpx-1.17.0/vpxenc.c:935:57: error: Uninitialized variable: arg.argv_step [uninitvar] Explanation: `arg.argv_step` is read only in the for-loop increment `argi += arg.argv_step`. That increment runs after the loop body, and the body's first statement is `arg.argv_step = 1`. Every path to the increment, including the `continue` paths, passes through that assignment, so the value is always initialized when read. The uninitvar error reported by main was a false positive. The PR's more precise per-path tracking removes it. ---- 29 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/magic/magic_8.3.703.orig.tar.gz Result: main magic-8.3.703/database/DBpaint.c:1663:12: style: Condition 'lr!=NULL' is always false [knownConditionTrueFalse] magic-8.3.703/database/DBpaint.c:1521:10: note: Assignment 'lhead=NULL', assigned value is 0 magic-8.3.703/database/DBpaint.c:1531:7: note: Assignment 'lr=lhead', assigned value is 0 magic-8.3.703/database/DBpaint.c:1663:12: note: Condition 'lr!=NULL' is always false Explanation: `lhead` is set to NULL at line 1521. Between that point and `lr = lhead` at line 1531, magic most likely fills the list through a search callback. The function then processes `lr` in its body: it frees it, recurses on it, and loops `while (lr != NULL)` to split the rectangles. Claiming that `lr != NULL` is always false would make the whole subdivision loop dead code, which is not how this code works. The visible code before line 1663 even dereferences `lr` (`lr->r_r`). Main reported a false positive, probably from a fork path that wrongly stood in for every path. The PR's change in how paths through undecided ifs are tracked removes it. Lines 1532–1622 are not shown, so the exact path cannot be confirmed. ---- 30 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/magic/magic_8.3.703.orig.tar.gz Result: main magic-8.3.703/lef/lefTech.c:313:7: style: Condition '!isInactive' is always false [knownConditionTrueFalse] magic-8.3.703/lef/lefTech.c:250:9: note: Assuming that condition '!isInactive' is not redundant magic-8.3.703/lef/lefTech.c:301:11: note: Assuming condition is true magic-8.3.703/lef/lefTech.c:313:7: note: Condition '!isInactive' is always false Explanation: The `if (!isInactive)` block at line 250 returns only on its error paths (lines 273 and 278). The normal path falls through to the alias loop with `isInactive` false. So `!isInactive` at line 313 can be true, and the removed warning was a false positive. Main treated the block as always escaping because some inner paths returned. This PR targets exactly that case: it tracks the paths that stop inside a block separately from those that reach its end. ---- 31 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2558:7: warning: Uninitialized variable: *buf [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2338:18: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2481:12: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2484:13: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2558:7: note: Uninitialized variable: *buf Explanation: The same uninitvar warning for '*buf' at asnprint.c:2558 is still reported after the PR. Only the error-path notes changed: the condition at 2481 is now assumed false instead of true, and the 2484 step is gone. The code at 2338–2484 is not shown, so it is unclear which path is more accurate. The warning itself is likely suspect either way, since buf is probably filled through 'tmp' via StringMove. Users see the same warning at the same location, so the change makes no practical difference. ---- 32 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ndctl/ndctl_85.orig.tar.gz Result: main pmem-ndctl-b30f916/daxctl/device.c:895:23: style: Condition 'val>0' is always true [knownConditionTrueFalse] pmem-ndctl-b30f916/daxctl/device.c:878:10: note: Assuming that condition 'val<=0' is not redundant pmem-ndctl-b30f916/daxctl/device.c:890:10: note: Assuming condition is false pmem-ndctl-b30f916/daxctl/device.c:895:23: note: Condition 'val>0' is always true Explanation: Both main and the PR report the same warning at line 895. It is a true positive: line 878 returns when val <= 0, and val is not changed afterwards, so 'val > 0' is always true there. Only the error-path notes differ. With the PR, the warning comes from the forked path that walked through 'if (align > 0)' and 'if (rc < 0)' and carried on to the end of the function. That adds notes at lines 881 and 883. These notes do not affect val's value, so they are a bit noisier, but they describe a feasible path and are not wrong. The diagnostic is essentially unchanged for users. ---- 33 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ndctl/ndctl_85.orig.tar.gz Result: your pmem-ndctl-b30f916/daxctl/device.c:895:23: style: Condition 'val>0' is always true [knownConditionTrueFalse] pmem-ndctl-b30f916/daxctl/device.c:878:10: note: Assuming that condition 'val<=0' is not redundant pmem-ndctl-b30f916/daxctl/device.c:881:12: note: Assuming condition is true pmem-ndctl-b30f916/daxctl/device.c:883:10: note: Assuming condition is false pmem-ndctl-b30f916/daxctl/device.c:890:10: note: Assuming condition is false pmem-ndctl-b30f916/daxctl/device.c:895:23: note: Condition 'val>0' is always true Explanation: Both versions report the same correct warning. Line 878 returns when 'val <= 0', and val is not changed before line 895, so 'val > 0' is always true there. Only the error path differs. The new path adds notes that it assumed 'align > 0' was true at 881 and 'rc < 0' was false at 883. These conditions do not affect val, so the extra notes are slightly noisy but not wrong. The warning, its location and its correctness are unchanged. ---- 34 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ntpsec/ntpsec_1.2.5+dfsg.orig.tar.xz Result: your ntpsec-1.2.5+dfsg/libparse/clk_rawdcf.c:312:17: style: Variable 'e' can be declared as pointer to const [constVariablePointer] Explanation: In cvt_rawdcf, 'e' is set to buffer + size and appears to be used only as the loop bound in 'while (s < e)'. All writes go through 's', not 'e'. The visible code never writes through 'e', and the known ntp/ntpsec version of this function only compares it. So 'e' could be declared 'const unsigned char *', and the new constVariablePointer warning looks like a true positive. The likely cause is that the value-flow change removed something that earlier made Cppcheck treat 'e' as possibly written through. The rest of the function is not shown, so confidence is medium. ---- 35 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/open-iscsi/open-iscsi_2.1.13.orig.tar.gz Result: main open-iscsi-open-iscsi-40f6b29/usr/discoveryd.c:182:40: warning: Uninitialized variables: rec.list, rec.tpgt, rec.startup, rec.leading_login, rec.session, rec.disc_type, rec.disc_port [uninitvar] open-iscsi-open-iscsi-40f6b29/usr/discoveryd.c:158:18: note: Assuming condition is false open-iscsi-open-iscsi-40f6b29/usr/discoveryd.c:173:7: note: Assuming condition is false open-iscsi-open-iscsi-40f6b29/usr/discoveryd.c:182:40: note: Uninitialized variables: rec.list, rec.tpgt, rec.startup, rec.leading_login, rec.session, rec.disc_type, rec.disc_port Explanation: This removed line is not a real fix. The same uninitvar warning at line 182 is still reported, with a new 'your' line taking its place. Both versions are false positives: `rec` is the iterator of `list_for_each_entry_safe`, and its fields come from list entries that are already initialized. The new message is worse than the old one. Every member is listed twice ('rec.list, rec.list, rec.tpgt, rec.tpgt, ...'), presumably because two forked paths now report the same values. The removed version listed each member once. So the false positive stays and its text became less accurate. ---- 36 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/par2cmdline/par2cmdline_2.0.0.orig.tar.bz2 Result: your par2cmdline-2.0.0/src/md5_test.cpp:129:7: style: The if condition is the same as the previous if condition [duplicateCondition] par2cmdline-2.0.0/src/md5_test.cpp:107:11: note: 'hash2' is assigned value 'hash1' here. par2cmdline-2.0.0/src/md5_test.cpp:125:7: note: First condition par2cmdline-2.0.0/src/md5_test.cpp:129:7: note: Second condition Explanation: After `hash2 = hash1`, main correctly reported that `!(hash1<=hash2)` at line 125 is always false. The PR drops that warning. It adds a duplicateCondition at line 129 instead, claiming `!(hash1 >= hash2)` is the same as the previous condition `!(hash1 <= hash2)`. These conditions use different operators, so they are not the same condition. They only happen to have the same value because the operands are equal. The new message is misleading and less accurate than the knownConditionTrueFalse it replaces. This suggests the PR changed how the value is tracked through the chain of escaping ifs. ---- 37 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pfstools/pfstools_2.2.0.orig.tar.gz Result: your pfstools-2.2.0/src/camera/pfsalign.cpp:563:21: error: Using pointer that is a temporary. [danglingTemporaryLifetime] pfstools-2.2.0/src/camera/pfsalign.cpp:567:44: note: Pointer to container is created here. pfstools-2.2.0/src/camera/pfsalign.cpp:564:20: note: Assuming condition is true pfstools-2.2.0/src/camera/pfsalign.cpp:569:9: note: Assuming condition is true pfstools-2.2.0/src/camera/pfsalign.cpp:574:15: note: Assuming condition is true pfstools-2.2.0/src/camera/pfsalign.cpp:561:19: note: Assuming condition is false pfstools-2.2.0/src/camera/pfsalign.cpp:567:36: note: Temporary created here. pfstools-2.2.0/src/camera/pfsalign.cpp:563:21: note: Using pointer that is a temporary. Explanation: At line 567, `f_name = f_name_str.str().c_str();` stores a pointer into a temporary std::string that is destroyed at the end of that statement. The real dangling use is `VERBOSE_STR << "Loading " << f_name` at line 569. Main reported exactly that location (569:38), which is a correct true positive. The PR drops it and instead reports 563:21, reached after looping back through line 561. At line 563 `f_name` is only overwritten with a new value from `getString()`, so the dangling pointer is not read there. The new location and path are wrong, and the real use is no longer reported, so the message is less accurate. ---- 38 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pocketpy/pocketpy_2.1.8+ds.orig.tar.xz Result: main pocketpy-pocketpy-a2f16e5/src/public/CodeExecution.c:110:18: style: Condition 'max_index==-1' is always true [knownConditionTrueFalse] pocketpy-pocketpy-a2f16e5/src/public/CodeExecution.c:93:22: note: Assignment 'max_index=-1', assigned value is -1 pocketpy-pocketpy-a2f16e5/src/public/CodeExecution.c:110:18: note: Condition 'max_index==-1' is always true Explanation: `max_index` starts at -1, but inside the `c11__foreach` loop it is set to `c11__max(max_index, index)` on every path that does not hit `continue`. That happens whenever a `_` or `_N` placeholder name is loaded. So `max_index == -1` at line 110 is not always true. Main lost track of that assignment past the `continue` statements and reported a false positive. The PR walks the paths that part in the block correctly and removes the false positive. ---- 39 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/rsyslog/rsyslog_8.2610.0.orig.tar.gz Result: your rsyslog-8.2610.0/runtime/queue.c:3300:13: style: Condition 'ret!=RS_RET_OK' is always false [knownConditionTrueFalse] rsyslog-8.2610.0/runtime/queue.c:3122:5: note: Assignment 'iRet=RS_RET_OK', assigned value is 0 rsyslog-8.2610.0/runtime/queue.c:3127:22: note: Assuming condition is true rsyslog-8.2610.0/runtime/queue.c:3299:49: note: Calling function 'DoDeleteBatchFromQStore' returns 0 rsyslog-8.2610.0/runtime/queue.c:3299:49: note: Assignment 'ret=DoDeleteBatchFromQStore(queue,batch->nElemDeq)', assigned value is 0 rsyslog-8.2610.0/runtime/queue.c:3300:13: note: Condition 'ret!=RS_RET_OK' is always false Explanation: The new warning says `ret != RS_RET_OK` is always false because `DoDeleteBatchFromQStore()` is taken to always return 0. The evidence is `iRet=RS_RET_OK` at line 3122 plus an "Assuming condition is true" at line 3127. The body of `DoDeleteBatchFromQStore` (lines ~3120-3140) is not shown, so I cannot tell whether a path there can set `iRet` to an error, e.g. via CHKiRet/goto in the disk or other branch. If that function really always returns RS_RET_OK, the warning is a true positive about a redundant check. However, the known value depends on an assumed condition, and the PR rewrites how forked paths are joined. That makes it plausible the new path handling dropped a path that changes `iRet`, which would be a false positive. Without the callee's code this cannot be decided. ---- 40 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/scamper/scamper_20211212.orig.tar.gz Result: main scamper-cvs-20211212/utils/sc_hoiho/sc_hoiho.c:5298:15: style: Condition '*ptr!=')'' is always true [knownConditionTrueFalse] scamper-cvs-20211212/utils/sc_hoiho/sc_hoiho.c:5289:20: note: Assuming that condition '*ptr=='('' is not redundant scamper-cvs-20211212/utils/sc_hoiho/sc_hoiho.c:5298:15: note: Condition '*ptr!=')'' is always true Explanation: Inside the branch where `*ptr == '('`, the code runs `while(*ptr != ')') ptr++;`. The condition is true only on the first check. `ptr` is incremented in the loop body, so later checks can be false; otherwise the loop would never end. Calling the loop condition 'always true' was a false positive, and the pull request removes it. ---- 41 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/scamper/scamper_20211212.orig.tar.gz Result: main scamper-cvs-20211212/utils/sc_hoiho/sc_hoiho.c:7202:34: style: Condition '*ptr!='\0'' is always true [knownConditionTrueFalse] scamper-cvs-20211212/utils/sc_hoiho/sc_hoiho.c:7193:12: note: Assuming that condition '*ptr=='['' is not redundant scamper-cvs-20211212/utils/sc_hoiho/sc_hoiho.c:7202:34: note: Condition '*ptr!='\0'' is always true Explanation: Line 7202 is a while-loop condition. ptr is incremented in the loop body, so later iterations can reach '\0'. That is why the code checks for '\0' right after the loop. The condition is not always true just because *ptr=='[' on entry. The warning was a false positive, and removing it is an improvement. ---- 42 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sdcc/sdcc_4.5.0+dfsg.orig.tar.xz Result: your sdcc-4.5.0+dfsg/src/SDCCsymt.c:3917:19: warning: Either the condition 'type' is redundant or there is possible null pointer dereference: type. [nullPointerRedundantCheck] sdcc-4.5.0+dfsg/src/SDCCsymt.c:3909:19: note: Assuming that condition 'type' is not redundant sdcc-4.5.0+dfsg/src/SDCCsymt.c:3917:19: note: Null pointer dereference Explanation: Both main and the PR report the same nullPointerRedundantCheck at 3917:19 (and at 3917:48). Only the cited condition changed, from the macro check at line 3907 (IFFUNC_ISRAISONANCE) to the equivalent one at line 3909 (IFFUNC_ISIAR). Both macros null-check 'type' the same way, so neither line is more accurate. Whether the warning itself is right is unchanged by the PR. This is just a different choice of which earlier condition to cite. ---- 43 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/slic3r/slic3r_1.3.0+dfsg1.orig.tar.gz Result: main Slic3r-1.3.0/xs/src/polypartition.cpp:604:9: style: Condition 'i==(n-1)' is always false [knownConditionTrueFalse] Slic3r-1.3.0/xs/src/polypartition.cpp:592:11: note: Assuming that condition 'i<(n-1)' is not redundant Slic3r-1.3.0/xs/src/polypartition.cpp:598:8: note: Assuming condition is true Slic3r-1.3.0/xs/src/polypartition.cpp:602:9: note: Assuming condition is true Slic3r-1.3.0/xs/src/polypartition.cpp:604:9: note: Condition 'i==(n-1)' is always false Explanation: The warning itself is a true positive. Inside the loop 'for(i=0;i<(n-1);i++)', i is always less than n-1, so 'i==(n-1)' at line 604 is always false. The PR only changes the error path. The old path included the note 'Assuming condition is true' for line 602 ('if(i==0)'). That assumption is not needed: i=width)?height:width', assigned value is -2147483648 spice-gtk-0.42/subprojects/spice-common/common/lines.c:1502:25: note: Negative value is converted to an unsigned value Explanation: The removed warning relies on `list_len` being -2147483648. That requires `ybottom` to be set to MAX_COORDINATE (apparently INT_MAX here) at line 1491 under the 'assuming condition is true' step, so that `ybottom - ytop + 1` overflows. But `ybottom` is `pGC->height - 1`, an int, so `ybottom > MAX_COORDINATE` can never hold if MAX_COORDINATE is INT_MAX, and the overflowing assignment is never reached. (If MAX_COORDINATE were a smaller constant such as 32767, height would be small and positive, and the reported value would not appear.) Either way, a negative `list_len` is not realistic, so the warning was a false positive and dropping it helps users. The macro value is inferred from the reported value, not shown, so confidence is medium. ---- 45 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/stellarsolver/stellarsolver_2.7.orig.tar.gz Result: your stellarsolver-2.7/stellarsolver/astrometry/blind/verify.c:1153:9: warning: If memory allocation fails, then there is a possible null pointer dereference: invrperm [nullPointerOutOfMemory] stellarsolver-2.7/stellarsolver/astrometry/blind/verify.c:1146:22: note: Assuming allocation function fails stellarsolver-2.7/stellarsolver/astrometry/blind/verify.c:1146:22: note: Assignment 'invrperm=malloc(v->NRall*sizeof(int))', assigned value is 0 stellarsolver-2.7/stellarsolver/astrometry/blind/verify.c:1153:9: note: Null pointer dereference Explanation: Line 1146 assigns `invrperm = malloc(...)` and never checks the result. Line 1153 then writes `invrperm[v->refperm[i]] = i` in a loop. If the allocation fails, that write dereferences a null pointer, so the new nullPointerOutOfMemory warning is a true positive. The `if (DEBUGVERIFY)` block in between only writes to the same pointer and does not reassign it. The PR's better handling of the paths past that if lets the null value reach line 1153, where main lost it. ---- 46 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tippecanoe/tippecanoe_2.79.0.orig.tar.gz Result: main tippecanoe-2.79.0/tile.cpp:1079:11: warning: Uninitialized variables: sf.reduced, sf.reduced, sf.coalesced, sf.coalesced, sf.line_detail, sf.line_detail, sf.extra_detail, sf.extra_detail, sf.maxzoom, sf.maxzoom, sf.spacing, sf.spacing, sf.simplification, sf.simplification, sf.renamed, sf.renamed, sf.clustered, sf.clustered, sf.stringpool, sf.stringpool, sf.z, sf.z, sf.tx, sf.tx, sf.ty, sf.ty [uninitvar] tippecanoe-2.79.0/tile.cpp:1073:11: note: Assuming condition is true tippecanoe-2.79.0/tile.cpp:1074:8: note: Assuming condition is true tippecanoe-2.79.0/tile.cpp:1079:11: note: Uninitialized variables: sf.reduced, sf.reduced, sf.coalesced, sf.coalesced, sf.line_detail, sf.line_detail, sf.extra_detail, sf.extra_detail, sf.maxzoom, sf.maxzoom, sf.spacing, sf.spacing, sf.simplification, sf.simplification, sf.renamed, sf.renamed, sf.clustered, sf.clustered, sf.stringpool, sf.stringpool, sf.z, sf.z, sf.tx, sf.tx, sf.ty, sf.ty Explanation: Both versions report the same uninitvar at the `return sf;` on line 1079, so whether the warning itself is right does not change. In main the paths through `if (compressed)` were not merged. Every member name appeared twice in the list, and there was an extra 'Assuming condition is true' note for line 1074. That note is irrelevant, because `sf`'s members are in the same state whether or not `geoms->end()` is called. The PR's version lists each member once and keeps only the relevant note for `len <= 0`. The message is therefore cleaner and more accurate. ---- 47 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tippecanoe/tippecanoe_2.79.0.orig.tar.gz Result: your tippecanoe-2.79.0/tile.cpp:1079:11: warning: Uninitialized variables: sf.reduced, sf.coalesced, sf.line_detail, sf.extra_detail, sf.maxzoom, sf.spacing, sf.simplification, sf.renamed, sf.clustered, sf.stringpool, sf.z, sf.tx, sf.ty [uninitvar] tippecanoe-2.79.0/tile.cpp:1073:11: note: Assuming condition is true tippecanoe-2.79.0/tile.cpp:1079:11: note: Uninitialized variables: sf.reduced, sf.coalesced, sf.line_detail, sf.extra_detail, sf.maxzoom, sf.spacing, sf.simplification, sf.renamed, sf.clustered, sf.stringpool, sf.z, sf.tx, sf.ty Explanation: Both versions report the same uninitvar warning at line 1079, where a default-constructed `serial_feature sf` with only `sf.t` set is returned. Whether the warning is right depends on the `serial_feature` definition, which is not shown. That question is unchanged by the PR. What changed is the message text. Main listed every member twice (`sf.reduced, sf.reduced, ...`) and had an extra 'Assuming condition is true' note at line 1074. That note is irrelevant: the `if (compressed)` block does not touch `sf`, and the duplicate names come from the two paths through it being reported together. The PR walks the `if (compressed)` block without splitting the path for good, so the message now lists each member once with a single relevant note. The report is more accurate and less noisy, with no change in what is detected. ---- 48 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/w/webdar/webdar_1.0.0.orig.tar.gz Result: main webdar-1.0.0/src/server.cpp:228:15: style: Condition 'sess!=nullptr' is always true [knownConditionTrueFalse] Explanation: `sess` is a session pointer that is only acquired on some paths inside the inner while loop, for example the valid-session branch at line 197. Other paths, such as authentication failure, or a loop that does not run, leave it null. The code itself treats null as possible: line 195 checks `sess == nullptr`, and the catch handler repeats the null check. So 'sess!=nullptr is always true' at line 228 is a false positive. It most likely came from main letting one path (the one past `if(sess == nullptr) throw WEBDAR_BUG;`) stand for every path. The PR's path tracking stops that, and the false positive disappears. ---- 49 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/w/wp2latex/wp2latex_4.26~ds.orig.tar.xz Result: your wp2latex-4.26/sources.cc/cp_lib/cpbldr.cc:406:11: warning: If resource allocation fails, then there is a possible null pointer dereference: F [nullPointerOutOfResources] wp2latex-4.26/sources.cc/cp_lib/cpbldr.cc:305:11: note: Assuming allocation function fails wp2latex-4.26/sources.cc/cp_lib/cpbldr.cc:305:11: note: Assignment 'F=fopen(Switch,"wb")', assigned value is 0 wp2latex-4.26/sources.cc/cp_lib/cpbldr.cc:406:11: note: Null pointer dereference Explanation: Only the PR reports `F` (from `fopen` at line 305) as possibly null at lines 399 and 406, right after the big loop with the nested if/else. The pattern of warnings is inconsistent. The same `F` is dereferenced inside the loop (374, 378, 388) and after line 406 (412–419), yet none of those are reported. That suggests the null value did not really flow into this function body. More likely, a check on `F` after the `fopen` (not shown) handles the failure case, and the PR's new path splitting through the preceding if/else wrongly carries the null value past the loop. Lines 305–365 are not shown, so this cannot be confirmed; if there were no check at all, the warning would be a true positive. ---- 50 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/z/zix/zix_0.8.2.orig.tar.xz Result: your zix-0.8.2/src/tree.c:433:7: style: Variable 'to_balance' is assigned an expression that holds the same value. [redundantAssignment] zix-0.8.2/src/tree.c:401:33: note: to_balance is assigned 'n->parent' here. zix-0.8.2/src/tree.c:404:34: note: Assuming condition is false zix-0.8.2/src/tree.c:414:8: note: Assuming condition is true zix-0.8.2/src/tree.c:429:16: note: Assuming condition is true zix-0.8.2/src/tree.c:431:9: note: Assuming condition is true zix-0.8.2/src/tree.c:433:7: note: Variable 'to_balance' is assigned an expression that holds the same value. Explanation: `to_balance` is initialised to `n->parent` at line 401, and `n->parent` is never reassigned before line 433. The only write in between is `*pp = NULL`, where `pp` is `&n->parent->left` or `&n->parent->right`. That changes a child pointer of the parent, not `n->parent`, and in a valid tree it cannot alias it. So `to_balance = n->parent;` at line 433 really does store the value it already holds. The new redundantAssignment is a true positive (the same holds for lines 441 and 452). It likely appears now because the PR keeps the forked paths through the nested ifs and so tracks the value further. It is a minor style finding, but correct.