{ "tokens": { "input": 399348, "cache_read": 67568, "cache_write": 14832, "output": 23233 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn10k_ethdev.c:203:18: style: Variable 'nix' can be declared as pointer to const [constVariablePointer]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main hit a false syntax error in cn10k_tx.h at line 944. That header is included by cn10k_ethdev.c, so the whole file went unanalyzed. The PR now accepts unary operators like ! and ~ after a negative sign, so the file is analyzed. At line 203, 'nix' is a pointer that is only used to read nix->tx_compl_ena. It is never written through or passed on as non-const, so it can be declared 'const struct roc_nix *'. The new warning is a true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn10k_ethdev.c:350:21: style: Variable 'rq' can be declared as pointer to const [constVariablePointer]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main reported a false syntaxError in cn10k_tx.h, which is included by this file. That error stopped analysis of the whole translation unit. The PR now accepts unary operators like `!` and `~` after a leading negative sign, so the file is analyzed and new warnings appear. Here `rq` is only read (`rq->meta_aura_handle`), so `struct roc_nix_rq *rq` could be `const struct roc_nix_rq *`. The constVariablePointer warning is a true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn10k_tx.h:1164:15: style: Variable 'w1.ol4type' is assigned a value that is never used. [unreadVariable]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "This warning only shows up because the PR stopped the false syntaxError at line 944, so Cppcheck now analyzes the function. The warning itself is a false positive. In DPDK cnxk, `w1` is a `union nix_send_hdr_w1_u` with bitfields such as `ol4type` and a 64-bit member `u`. After `w1.ol4type` is assigned at line 1164, line 1171 reads the whole union through `send_hdr->w1.u = w1.u;`, so the bitfield value is used. Cppcheck does not see that `w1.u` aliases `w1.ol4type` and wrongly reports unreadVariable. Removing the syntax error is good, but this new line is a false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn10k_tx.h:1618:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rte_memory_order_relaxed [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main hit a syntax error at cn10k_tx.h:944 because it rejected valid code where a unary minus/plus is followed by another unary operator such as '!', '~', '&', '++' or '--'. The PR accepts these operators, so the file is now parsed and analyzed. This debug bailout is one of many new messages that appear because the file is now analyzed at all. It comes from the unknown macro/enum rte_memory_order_relaxed, which is expected when headers are missing. The syntax error going away is the real change, and it is good." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn20k_ethdev.c:165:98: style: Parameter 'sq' can be declared as pointer to const [constParameterPointer]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "In cn20k_nix_tx_compl_setup, the parameter 'sq' is only read (sq->cqid is used as an array index) and is never written through. So 'struct roc_nix_sq *sq' could indeed be declared as a pointer to const, and the warning is a true positive. It appears now because the PR fixes a false syntaxError in the included cn10k_tx.h/cn20k_tx.h, which contain unary expressions such as -!! and -~. That syntax error had stopped analysis of the whole translation unit, so the new warnings come from Cppcheck understanding the code better." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn20k_ethdev.c:643:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOTSUP [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Main hit a false syntaxError in an included header (cn20k_tx.h:931, likely a construct like `-!!x` or `-~x`), which stopped analysis of the whole cn20k_ethdev.c translation unit. The PR now accepts those unary operators after a sign. So the file is analysed and normal output shows up. This line is only a valueFlowBailoutIncompleteVar debug message: ENOTSUP is a macro whose header is not included. It comes from analysing more code, not from Cppcheck understanding the code worse. It does not matter to users either way. The overall change, removing the false syntax error, is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn20k_ethdev.c:715:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINVAL [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main aborted cn20k_ethdev.c with a syntax error in the included cn20k_tx.h at line 931, likely an expression like '-~x' or '-!x' that the PR now accepts. With the false syntax error gone, the whole file is analyzed. This valueFlowBailoutIncompleteVar debug message is a side effect of that analysis: EINVAL comes from an unseen system header. It does not mean Cppcheck understands the code worse. Overall the change is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn9k_ethdev.c:153:23: style: Variable 'send_hdr_w0.sizem1' is assigned a value that is never used. [unreadVariable]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`send_hdr_w0` is a `union nix_send_hdr_w0_u`. The write `send_hdr_w0.sizem1 = 3` is a bitfield write into the union, and that value is read afterwards through `send_hdr_w0.u` in `txq->send_hdr_w0 = send_hdr_w0.u;`. So the value is used, and the unreadVariable warning is a false positive. It shows up only because the PR fixed the syntaxError in the included cn9k_tx.h (e.g. `-!!` or `-~` expressions), so this file is now analyzed. The fix itself is good, but this particular new warning is a false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn9k_ethdev.c:15:25: style: Variable 'rxmode' can be declared as pointer to const [constVariablePointer]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main hit a false syntax error in the included cn9k_tx.h (a unary operator after a negative sign, the pattern this PR now accepts), so cn9k_ethdev.c was never checked. With the PR the file is analyzed. In nix_rx_offload_flags, 'rxmode' is only read (rxmode->mq_mode) and never used to modify anything or passed on. Declaring it as 'const struct rte_eth_rxmode *' is valid, so this is a new true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn9k_ethdev.c:279:21: style: Variable 'cq' can be declared as pointer to const [constVariablePointer]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main hit a false syntax error in the included cn9k_tx.h, caused by a unary operator after a sign such as `-!!x`, and so skipped this file. With the fix the file is analyzed. In the lines shown, `cq` is only read (`cq->desc_base`, `door`, `status`, `wdata`, `head`, `qmask`) after being set to `&dev->cqs[qid]`. So declaring it as `const struct roc_nix_cq *` looks valid and the new warning is likely a true positive. The rest of the function is not shown, which is why confidence is medium." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn9k_ethdev.c:775:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mark_vlan_dei [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "cn9k_tx.h is included by cn9k_ethdev.c. On main, line 288 of that header (an expression like `-!...` or `-~...`) caused a false syntaxError, and Cppcheck stopped analyzing the whole file. The PR now accepts unary !, ~, &, ++ and -- after a leading - or +, so the file gets analyzed. This valueFlowBailoutIncompleteVar debug message is a side effect of that analysis. It appears because cnxk_tm_ops.mark_vlan_dei is declared in a header that was not included. A false syntax error going away and normal analysis resuming is good for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dpdk/dpdk_25.11.4.orig.tar.xz", "your dpdk-stable-25.11.4/drivers/net/cnxk/cn9k_ethdev.c:790:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable create [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Main reported a false syntaxError in the included header cn9k_tx.h:288. DPDK uses expressions like `-!!(ol_flags & ...)`, which are valid C, and that error stopped analysis of cn9k_ethdev.c. With the PR, `-!` is accepted, so the file is now analyzed and ordinary debug output appears. This line is a normal valueFlowBailoutIncompleteVar note: `cnxk_flow_ops.create` is a struct member whose type comes from a header Cppcheck does not have. It does not mean Cppcheck understands the code worse; it is a side effect of the fixed syntax error (which is the actual improvement). The line itself makes no difference to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:1126:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_IGN [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main aborted the whole file zic.c with a syntaxError at line 3268, a false syntax error on a valid unary operator sequence such as -!, -~, +& or - --. With the PR the file is analyzed, so many new messages appear. This valueFlowBailoutIncompleteVar debug message is one of them. It only exists because the file is now processed instead of being rejected. SIG_IGN comes from a system header that is not included, so the bailout is expected. Getting the file analyzed at all is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:1140:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_DFL [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Before the PR, main stopped at a syntax error at zic.c:3268, presumably on a valid construct such as a unary minus followed by '!', '~', '&', '++' or '--'. The PR stops rejecting these, so the whole file is now analyzed and many new messages appear. This line is one of them: a valueFlowBailoutIncompleteVar debug message for SIG_DFL, which is undefined only because system headers are not included. It is a normal consequence of the file now being analyzed, not a sign that Cppcheck understands the code worse. The removal of the false syntax error is the real improvement; this debug line by itself does not matter to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:1602:21: style: Argument 'filename' shadows outer function [shadowFunction]\n glibc-2.44/timezone/zic.c:681:1: note: Shadowed function\n glibc-2.44/timezone/zic.c:1602:21: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main stopped analyzing zic.c because of a false syntaxError at line 3268. The PR fixes the tokenizer so unary operators like `!`, `~` and `&` are accepted after a sign, and the file is now analyzed. Recent tzcode zic.c defines a static function `filename()` (the note points to line 681). The parameter `char const *filename` of `diagdir` really does shadow that function. This is a genuine style finding that appears only because the false syntax error is gone." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:1607:23: style: Argument 'filename' shadows outer function [shadowFunction]\n glibc-2.44/timezone/zic.c:681:1: note: Shadowed function\n glibc-2.44/timezone/zic.c:1607:23: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The PR removes a false syntaxError at zic.c:3268, so Cppcheck now analyzes the whole file and reports new findings. In `diagslash`, the parameter `filename` has the same name as the file-scope function `filename()` that zic.c defines at line 681 to name input files in diagnostics. Inside `diagslash`, that function is hidden by the parameter, so the shadowFunction style warning is accurate. It is a true positive that only appears now because the bogus syntax error no longer stops analysis." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:1984:30: style:inconclusive: Function 'infile' argument 2 names different: declaration '' definition 'name'. [funcArgNamesDifferentUnnamed]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Before the PR, main stopped at a syntax error at zic.c:3268, likely an expression like `-!x` or `-~x`, so the whole file went unchecked. With that false syntax error fixed, the file is analyzed and many warnings appear, including this one. The definition `infile(int fnum, char const *name)` presumably matches an earlier prototype with unnamed parameters, so the warning is technically correct. It is only an inconclusive style note about a harmless C prototype convention and has little value to users. The real improvement is removing the syntax error; this line itself is neutral." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:2204:15: style:inconclusive: Function 'inzsub' argument 1 names different: declaration '' definition 'fields'. [funcArgNamesDifferentUnnamed]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main stopped at a false syntaxError at zic.c:3268, caused by a unary operator (e.g. `-!`, `-~`) after a negative sign. The PR accepts that construct, so zic.c is now fully analyzed and this warning appears. zic.c forward-declares its static functions with unnamed parameters (e.g. `static bool inzsub(char **, int, bool);`), while the definition at line 2204 names them `fields`, `nfields` and `iscont`. That is exactly what funcArgNamesDifferentUnnamed reports, so this is a correct (if minor, inconclusive style) finding that only became visible because the false syntax error was removed." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:2382:18: style:inconclusive: Function 'inexpires' argument 1 names different: declaration '' definition 'fields'. [funcArgNamesDifferentUnnamed]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main aborted zic.c with a false syntaxError at line 3268. The PR's tokenizer change now accepts a unary operator after a leading +/- (e.g. `-!`, `-~`, `+&`), so the whole file is analyzed. This new inconclusive style warning follows from that. zic.c forward-declares `inexpires` with unnamed parameters (e.g. `static void inexpires(char **, int);`), while the definition names them `fields` and `nfields`. The message is therefore accurate for what funcArgNamesDifferentUnnamed checks. It is a legitimate new finding that results from the removed false syntax error." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:3069:18: error: Invalid putc() argument nr 1. A non-boolean value is required. [invalidFunctionArgBool]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The warning shows up only because the PR fixed the bogus syntaxError at zic.c:3268, so Cppcheck now analyzes the whole file. In zic.c, `ttisstds` is a `bool` array. `putc(ttisstds[i], fp)` intentionally writes the 0/1 indicator byte that the TZif file format requires. The code is correct and portable, so reporting it as an error-severity invalidFunctionArgBool is a false positive. The underlying tokenizer fix is good, but this particular new finding is noise for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:3519:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable z_untiltime [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Main stopped analyzing zic.c because of a false syntaxError at line 3268. The PR accepts more unary operators after a leading +/- (e.g. `-!`, `-~`, `+&`), so the file is now fully analyzed. That is why many new messages appear, including this one. This bailout comes from an existing limitation: Cppcheck does not resolve the member access `(zp - 1)->z_untiltime` to a known variable. The PR did not cause that limitation; the message is only visible now that the function is analyzed at all. It is a byproduct of the overall improvement, not a sign that Cppcheck understands the code worse." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:3749:18: style: Variable 'lastat' can be declared as pointer to const [constVariablePointer]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main stopped at a syntax error at line 3268, which the PR fixes by accepting unary operators like `!`, `~` and `&` after a negated number. Analysis now continues and reports that `lastat` can be pointer to const. In the code, `lastat` is only reassigned to `&attypes[i]` and read through (`lastat->at`, `lastat->type`). Nothing is written through it, so `const struct attype *lastat` would be valid. This is a new true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:3780:15: style:inconclusive: Function 'addtype' argument 1 names different: declaration '' definition 'utoff'. [funcArgNamesDifferentUnnamed]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main stopped analyzing zic.c because of a false syntaxError at line 3268. That line likely contains a unary minus followed by a unary operator such as `!`, `~` or `&`, which the old tokenizer check rejected. The PR accepts these operators, so the file is now fully analyzed and this warning appears. tzcode's zic.c declares its static functions with unnamed parameters near the top (e.g. `static int addtype(zic_t, char const *, bool, bool, bool);`), while the definition names them `utoff`, `abbr`, etc. The funcArgNamesDifferentUnnamed report therefore matches what the check is meant to flag, making it a new true positive that results from removing a false syntax error." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:3780:34: style:inconclusive: Function 'addtype' argument 2 names different: declaration '' definition 'abbr'. [funcArgNamesDifferentUnnamed]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main reported a false syntaxError at zic.c:3268 and skipped the file. The PR now accepts unary operators like `!`, `~` or `&` after a unary minus/plus, so the file is analyzed. zic.c forward-declares its static functions with unnamed parameters (e.g. `static int addtype(zic_t, char const *, bool, bool, bool);`), and the definition names the second one `abbr`. The inconclusive style warning therefore states a correct fact and matches what this check is meant to report. It appears only because Cppcheck now parses the code correctly." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:3968:20: style:inconclusive: Function 'byword' argument 1 names different: declaration 'string' definition 'word'. [funcArgNamesDifferent]\n glibc-2.44/timezone/zic.c:456:50: note: Function 'byword' argument 1 names different: declaration 'string' definition 'word'.\n glibc-2.44/timezone/zic.c:3968:20: note: Function 'byword' argument 1 names different: declaration 'string' definition 'word'." ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main stopped on a bogus syntaxError at line 3268, a negation applied to an operand that starts with a unary operator such as `!`, `~` or `&`. The PR now accepts those operators, so zic.c is analyzed again and the syntax error is gone. The note shows the forward declaration at line 456 uses parameter name 'string', while the definition at line 3968 uses 'word'. The funcArgNamesDifferent warning is therefore a true positive that only appears because Cppcheck now understands the file." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:4023:28: style:inconclusive: Function 'getfields' argument 2 names different: declaration '' definition 'array'. [funcArgNamesDifferentUnnamed]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main aborted on zic.c with a false syntaxError at line 3268. The PR now accepts unary operators such as `!`, `~`, `&`, `++` and `--` after a leading `+`/`-`, which is valid C, so the file is analysed fully. This new style warning is a side effect of that. zic.c declares its static functions with unnamed parameters near the top of the file, e.g. `static int getfields(char *, char **, int);`. The definition at line 4023 names the parameter `array`, so the funcArgNamesDifferentUnnamed report is factually correct for that check. It is a low-severity inconclusive style note, but it is a legitimate finding, and it comes from Cppcheck now understanding the file instead of bailing out." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:4098:22: style:inconclusive: Function 'omul' argument 2 names different: declaration '' definition 't2'. [funcArgNamesDifferentUnnamed]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main aborted on zic.c with a false syntaxError at line 3268. The PR now accepts unary operators such as !, ~, &, ++ and -- after a leading unary +/-, so the file is analyzed fully. This new finding comes from that recovered analysis. zic.c forward-declares its static helpers, most likely with unnamed parameters (e.g. `static zic_t omul(zic_t, zic_t);`), while the definition at line 4098 names them t1 and t2. That is exactly what funcArgNamesDifferentUnnamed reports, so this is a correct (if minor, inconclusive) style finding that main missed. The forward declaration itself is not shown, so confidence is medium." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:753:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Main hit a syntaxError at zic.c:3268 (likely an expression like '-!x' or '-~x' that this PR now accepts), so the whole file was abandoned and nothing was reported. With the PR the file is analysed fully. This debug bailout appears only because analysis now reaches arg2num, and errno is undefined without system headers. Removing the false syntax error is an improvement, but this particular line is just an expected debug message that comes with analysing the file. It neither helps nor hurts users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/glibc/glibc_2.44.orig.tar.xz", "your glibc-2.44/timezone/zic.c:898:23: style: Condition 'pw' is always false [knownConditionTrueFalse]\n glibc-2.44/timezone/zic.c:897:27: note: Assignment 'pw=NULL', assigned value is 0\n glibc-2.44/timezone/zic.c:898:23: note: Condition 'pw' is always false" ], "verdict": { "verdict": "regression", "confidence": "low", "explanation": "The PR stops treating `-!!x`/`-~x` as syntax errors, so the syntax error at line 3268 is gone and zic.c is now fully analysed. That part is good. This particular new warning, though, is not useful. The note says `pw` was assigned NULL, which means Cppcheck used the configuration where `getpwnam(arg)` is a stub macro expanding to NULL (in tzcode, the !HAVE_PWD_H fallback). In that configuration the condition is technically always false. But the `pw ? pw->pw_uid : arg2num(...)` test is needed for real builds, where `getpwnam` can return a valid pointer. So the warning comes from a portability stub, and users will see it as a false positive. It is a side effect of now analysing the file rather than a meaningful finding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "main gmp-6.3.0+dfsg/tests/devel/try.c:636:61: error: syntax error [syntaxError]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Line 636 contains `!= - !perf_pow`, which is valid C (unary minus applied to logical not). Main wrongly raised a syntaxError on it because concatenateNegativeNumberAndAnyPositive only allowed +, - and * after a unary sign. The PR also allows `!`, so this false syntax error is gone. The rest of the file is now analyzed, which explains the many new warnings." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1488:50: style: Argument 'size' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:270:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:1488:50: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Before this PR, Cppcheck stopped on try.c with a false syntax error, apparently from a unary-operator sequence such as `-!` or `-~` that the old check rejected. The PR accepts those sequences, so the whole file is now analyzed and new warnings appear. Line 270 of try.c appears to declare a file-scope global `mp_size_t size;`, judging from the note's location in the global declarations section. The parameter `size` of MPN_COPY_fun therefore really shadows that global, so the shadowVariable warning is a genuine true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1496:55: style: Argument 'size' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:270:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:1496:55: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Before this PR, Cppcheck stopped on try.c with a false syntaxError. The unary-operator pattern it rejected (e.g. `-~x` or `-!x`) is valid code, so main analyzed nothing in this file. Now the file is analyzed and many new findings appear. This one is correct: line 270 declares a file-scope `size` (try.c keeps globals such as `size`, `shift` and `divisor` there). The parameter `mp_size_t size` of MPN_COPY_DECR_fun shadows that global. The style warning is genuine and comes from Cppcheck now understanding the file." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1624:66: style: Argument 'divisor' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:274:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:1624:66: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The PR stops Cppcheck from raising a false syntaxError on valid unary sequences such as `-!`, `-~`, `+&`, `- --` and `- ++`. try.c was most likely rejected before and is now analyzed, which is why many new findings appear in this file. In `mpn_modexact_1_odd_fun(..., mp_limb_t divisor)` the parameter `divisor` has the same name as the file-scope global `divisor` declared at line 274. Inside the function the global is hidden, so the shadowVariable style warning is factually correct. This is a new true positive that comes from better parsing." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1630:75: style: Argument 'size' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:270:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:1630:75: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Before the PR, the tokenizer threw a syntax error on unary operator sequences like `-!` or `+&`, so try.c was not analyzed at all. With the file now parsed, Cppcheck reports that the parameter `size` of mpn_toom22_mul_fun shadows a file-scope variable declared at line 270. The column (17) fits GMP's global-variable layout (`mp_size_t size;`), alongside the globals `shift` and `divisor` at lines 272 and 274. Line 270 itself is not shown, so this relies on that layout. If it holds, the argument really does shadow a global, making this a valid style finding gained from the better parsing." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1640:57: style: Argument 'size' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:270:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:1640:57: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main stopped analysing try.c because of a false syntaxError at line 636, which the PR removes. Cppcheck now analyses the whole file. The parameter 'size' of mpn_toom2_sqr_fun does shadow the file-scope global 'size' declared at line 270 (try.c keeps its test parameters, such as size, shift, divisor and carry, as globals). So this shadowVariable style warning is a true positive that appears only because the file is now parsed correctly." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1650:75: style: Argument 'size' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:270:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:1650:75: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main stopped with a false syntaxError at line 636, which the PR fixes (unary operators after a unary minus/plus), so the whole file is now analyzed. The parameter `mp_size_t size` of mpn_toom33_mul_fun really does shadow the file-scope variable `size` declared at line 270 (try.c keeps size, shift, divisor, etc. as globals). The new shadowVariable warning is therefore a true positive that main missed because of the bogus syntax error." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1663:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TMP_DECL [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Before the PR, try.c hit a false syntaxError at line 636, which is most likely a unary operator such as '-!' or '-~' that the tokenizer wrongly rejected. Because of that, main analyzed nothing in this file. The PR accepts these operators, so the whole file is now analyzed, and the usual debug bailouts appear. Here the bailout is for TMP_DECL, a GMP macro that is not defined in the analysis configuration. Cppcheck does not understand this code any worse than before; the message is just a side effect of the file being checked at all. Removing the syntax error is the real improvement, and this debug line on its own does not matter to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1673:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TMP_DECL [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Before the PR, main stopped with a syntax error at try.c:636 because it did not accept unary `!`, `~`, `&`, `++` or `--` after a leading `-`/`+`. With that fixed, the whole file is now analysed, so many new warnings appear further down. This line is one of them: a valueFlowBailoutIncompleteVar debug message caused by the unknown macro TMP_DECL. It is not a new failure to understand the code. It only shows up because the file is no longer abandoned early, and the overall change (syntax error removed) is an improvement. The debug message itself does not matter to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1692:20: style: Argument 'size' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:270:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:1692:20: note: Shadow argument" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "In main, Cppcheck stopped on try.c with a false syntaxError at line 636. The PR now accepts a unary operator such as `!`, `~` or `&` after a leading `-`/`+`, so the whole file is analyzed. The note points to line 270, where try.c declares a file-scope variable `size`, alongside other globals like `d`, `shift` and `divisor`. The parameter `mp_size_t size` of mpn_toom42_mulmid_fun really does shadow that global, so the new shadowVariable warning is a true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:1696:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TMP_DECL [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main stopped on a syntax error at line 636, so it never analyzed the rest of try.c. The PR accepts unary operators such as !, ~, & and ++/-- after a leading +/-, so the file now gets analyzed in full. This valueFlowBailoutIncompleteVar debug message appears only because Cppcheck now reaches this function. TMP_DECL is an unexpanded GMP macro, so the bailout is expected. Replacing a whole-file syntax-error bailout with real analysis is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:2627:18: style: Local variable 'shift' shadows outer variable [shadowVariable]\n gmp-6.3.0+dfsg/tests/devel/try.c:272:17: note: Shadowed variable\n gmp-6.3.0+dfsg/tests/devel/try.c:2627:18: note: Shadow local variable" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main stopped on a false syntaxError at try.c:636. The PR now accepts unary operators such as `!`, `~`, `&`, `++` and `--` after a leading `-`/`+`, so that error is gone and the whole file is analyzed. Line 272 declares a file-scope `shift` (one of the globals alongside `size`, `divisor` and `carry`). The block at 2627 declares a local `unsigned shift`, which really does shadow that global. This is a correct new style warning (true positive) that appears because Cppcheck now parses the file." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:3068:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable spinner_count [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Before the PR, main stopped analyzing try.c with a syntax error at line 636. The cause was a sign operator followed by a unary operator such as '!', '~' or '&', which is valid code. The PR accepts that pattern, so the whole file is now analyzed. This valueFlowBailoutIncompleteVar debug message is a side effect of the analysis now reaching try_one(). spinner_count is a global that is declared elsewhere, probably in a header that was not included. The message does not mean Cppcheck understands the code worse. It appears because the earlier false syntax error is gone, so overall this is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:3429:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable get [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Main aborted try.c with a false syntaxError at line 636, an expression combining unary operators that the PR now accepts. The whole file is now analyzed, so new messages appear throughout. This one is a valueFlowBailoutIncompleteVar debug message at line 3429. In the configuration being checked, that line is the deliberate non-code placeholder `Error, error, cannot get page size` (no HAVE_GETPAGESIZE, no HAVE_SYSCONF), and 'get' is just a word in that text. The bailout is a side effect of the file now being processed, not a sign that Cppcheck understands the code worse, so it is not meaningful to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:3568:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mp_trace_base [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main aborted the whole file with a syntax error at line 636, which was most likely an expression like `-~x` or `-!x` that the PR now accepts. Because the file is now analysed fully, Cppcheck emits new output, including this debug bailout. `mp_trace_base` is a global declared in a GMP header that Cppcheck does not see, so the incomplete-variable bailout is expected and harmless. It is a side effect of the analysis now running at all, which is better than giving up on the file." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gmp/gmp_6.3.0+dfsg.orig.tar.xz", "your gmp-6.3.0+dfsg/tests/devel/try.c:397:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GMP_NUMB_BITS [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main reported a false syntaxError at line 636, which made Cppcheck abort the whole file. The PR now accepts unary operators such as !, ~, &, ++ and -- after a leading +/-, so the file is analysed fully. The new valueFlowBailoutIncompleteVar debug message at line 397 is a side effect of that analysis now running: GMP_NUMB_BITS is an unknown macro in CNST_34LSUB1. The bailout is expected and harmless, and it replaces a much worse whole-file syntax error, so Cppcheck understands the code better." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/postgresql-18/postgresql-18_18.7.orig.tar.bz2", "main postgresql-18.7/src/timezone/zic.c:2800:3: error: syntax error [syntaxError]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`return -!!b;` is valid C: unary minus applied to the double logical negation of `b`. Main raised a false syntaxError because the tokenizer only accepted `+`, `-` or `*` after a unary minus. The PR also accepts `!`, which removes this false positive. This is the exact case the PR targets (#15183, `return -!!i;`). The new unknownMacro at line 2479 is a separate diff line and is not judged here." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/postgresql-18/postgresql-18_18.7.orig.tar.bz2", "your postgresql-18.7/src/timezone/zic.c:2479:29: error: There is an unknown macro here somewhere. Configuration is required. If INT64_FORMAT is a macro then please configure it. [unknownMacro]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main stopped with a bogus syntaxError at line 2800. That line very likely contains a valid unary sequence such as `-!`, `-~`, `- --` or `+&`, which `concatenateNegativeNumberAndAnyPositive` wrongly rejected. The PR accepts these operators, so tokenizing now gets further. It then reaches `\"%s\\t\" INT64_FORMAT \"%s\\n\"` at line 2479. INT64_FORMAT really is a PostgreSQL configuration macro (from c.h/pg_config.h) that Cppcheck cannot see here, so the unknownMacro message is accurate and tells the user what to configure. A false syntax error was replaced by a correct configuration diagnostic." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/scilab/scilab_2026.1.0+dfsg.orig.tar.xz", "your scilab-2026.1.0-983e9a1bd6ef77a0e132ed8c954d0a54d29abe2b/scilab/modules/randlib/sci_gateway/cpp/sci_grand.cpp:1357:25: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main stopped on this file with a false `syntaxError` at line 987. That line almost certainly contains valid code such as `-!x` or `-~x`, which the PR now accepts. So the file is now analysed and this warning is a side effect of that. The flagged code is a loop over `vectpDblInput` that checks `isScalar()` and returns an error on the first match. That is a find_if/any_of pattern, so the style hint is plausible, though rewriting it needs the index for the error message. Gaining real analysis of the file in place of a bogus syntax error is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/scilab/scilab_2026.1.0+dfsg.orig.tar.xz", "your scilab-2026.1.0-983e9a1bd6ef77a0e132ed8c954d0a54d29abe2b/scilab/modules/randlib/sci_gateway/cpp/sci_grand.cpp:654:17: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "In main, Cppcheck stopped on this file with a false syntaxError at line 987. That code likely uses a unary operator such as '!', '~' or '&' after a unary minus or plus, which is valid C++. The PR accepts these operators, so the file is now tokenized and analyzed. This warning is one of the results of that analysis. The loop at line 651 scans the first three inputs, and on the first non-scalar element it frees pDblOut, reports an error and returns. That is a find-first-match pattern, so suggesting std::find_if is a legitimate, if debatable, style hint. The index is still needed for the error message, but it can be recovered with std::distance. Overall, analyzing a file that was previously rejected by mistake is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/w/wireguard-linux-compat/wireguard-linux-compat_1.0.20210219.orig.tar.xz", "your wireguard-linux-compat-1.0.20210219/src/crypto/zinc/curve25519/curve25519-fiat32.c:212:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable u32 [valueFlowBailoutIncompleteVar]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Main reported a false syntaxError at line 100. That line is probably an expression like `-!x` or `-~x`, which this PR now accepts. With the syntax error gone, Cppcheck analyzes the whole file. The new debug bailout at line 212 comes from that analysis: `u32` is a kernel typedef from a header that is not included. This is a side effect of the file now being processed, not a sign that Cppcheck understands the code worse. Overall the change is an improvement." } } ], "started": "2026-11-15 07:03:06 UTC", "runner": "server" }