AI review of 2026-11-21_13-24-09-69895d97f70a-results.txt PR: #9048 https://github.com/cppcheck-opensource/cppcheck/pull/9048 Tested: 69895d97f70a0929c96a41e45d1fbf96f0497950 Merge base: 376ebd743d56efc381624d5873af4d4a3e93bb71 Reviewed: 2026-11-21 18:27:16 UTC Model: claude-opus-5-5 (effort high) Results: 10 reviewed of 10 in the report Verdicts: 10 improvement Tokens: 13642 input, 502083 cache read, 55787 cache write, 3485 output The verdicts are written by AI and can be wrong. ---- 1 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/lib/nfp/DirectVincenty.c:63:2: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's existing no-EOF-newline detection as a portability warning. DirectVincenty.c ends with the closing `}` on line 63, and the reported column 2 points just after it, so the file evidently has no trailing newline. C requires a non-empty source file to end in a new-line character; violating that is undefined behavior. The new portability warning is therefore a true positive, though of low practical importance. ---- 2 / 10 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/lib/nfp/KML_Funcs.h:64:7: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's PORTABILITY_NO_EOF_NEWLINE output as a portability warning; before, it was silently dropped. The header ends with '#endif' at line 64, column 7, which is right after the 6 characters of '#endif'. That location points to the end of the last line with no trailing newline. A non-empty source file that does not end in a newline is undefined behavior in C before C11 (C99 5.1.1.2). This is a new true positive with an accurate message. ---- 3 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/lib/nfp/SCRIP2KMLW.c:215:2: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's portability warning for a missing newline at end of file; before, it was silently dropped. The file SCRIP2KMLW.c ends with the closing '}' on line 215. The warning's column 2, right after that '}', indicates the file ends without a trailing newline. For a C source file, a non-empty file that does not end in a newline is undefined behavior per C 5.1.1.2. So this is a correct, newly reported portability finding (a true positive), even if it is of low practical impact. ---- 4 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/lib/nfp/Unstruct2KMLW.c:162:2: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's PORTABILITY_NO_EOF_NEWLINE output as a portability warning; before, it was silently dropped. Unstruct2KMLW.c is a C file whose last line is the closing '}' at line 162. The location 162:2, right after the brace, means the file ends without a trailing newline. In C (C99/C11 5.1.1.2p2) a non-empty source file that does not end in a newline is undefined behavior, so the warning is correct. It is a new true positive, although of low practical impact. ---- 5 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/lib/nfp/add_NCL_KML_2DGrid_W.c:158:2: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's PORTABILITY_NO_EOF_NEWLINE output as a portability warning; before, it was silently dropped. Line 158 is the closing '}' of the file, and column 2 is just after it, so the file ends without a newline. This is a C file. C requires a non-empty source file to end in a new-line character (C11 5.1.1.2), and breaking that 'shall' rule is undefined behavior. Most compilers accept such files, so the practical impact is small, but the finding is a correct, real portability issue that users can opt into via the portability severity. ---- 6 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/lib/nfp/add_NCL_KML_UnstructGrid_W.c:170:2: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's PORTABILITY_NO_EOF_NEWLINE output as a portability warning. Before, it was silently dropped. The file ends with '}' at line 170 col 1 and the warning is at col 2, so the file apparently has no trailing newline. In C before C11 (C99 5.1.1.2), a non-empty source file that does not end in a newline is undefined behavior. The new warning is a true positive. ---- 7 / 10 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/lib/nfp/rgba2png.h:14:9: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's PORTABILITY_NO_EOF_NEWLINE output as a portability warning. Before, it was silently dropped. The header rgba2png.h ends with '#endif' on line 14, and per the diff that line has no trailing newline (column 9 is just past '#endif'). In C before C11-era clarifications, a non-empty source file that does not end in a newline is undefined behavior (C99 5.1.1.2p2). This is a true positive newly reported in a .h file of a C project. ---- 8 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sphinxbase/sphinxbase_0.8+5prealpha+1.orig.tar.gz Result: your sphinxbase-5prealpha/src/libsphinxbase/util/bitarr.c:139:2: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's PORTABILITY_NO_EOF_NEWLINE output as a portability warning; before, it was silently dropped. The warning points at the closing '}' on line 139, the last line of bitarr.c. simplecpp only raises it when the file really does not end with a newline. In C, a non-empty source file without a final newline is undefined behavior (C99/C11 5.1.1.2). This is therefore a new true-positive portability finding, although the listing alone cannot confirm the missing newline byte. ---- 9 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/transcend/transcend_0.3.dfsg2.orig.tar.gz Result: your transcend-0.3+dfsg2.orig/minorGems/network/linux/gnut_lib.c:116:24: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's existing no-EOF-newline diagnostic as a portability warning. The file is a C file, and its last line (116) has content up to column 24, probably whitespace, with no terminating newline. C (5.1.1.2) requires a non-empty source file to end in a newline, and violating that is undefined behavior. The warning is therefore technically correct and is a new true positive. Some users may find it noisy. ---- 10 / 10 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/transcend/transcend_0.3.dfsg2.orig.tar.gz Result: your transcend-0.3+dfsg2.orig/minorGems/network/linux/gnut_net.c:562:2: portability: No newline at end of file is undefined behavior in C. [simplecppPortabilityNoEofNewline] Explanation: The PR now reports simplecpp's PORTABILITY_NO_EOF_NEWLINE output as a portability warning; before, it was silently dropped. The listing shows only whitespace lines after the closing brace of the last function. The warning is at line 562, column 2, which fits a final line holding just a tab with no newline after it. A C source file that does not end in a newline is undefined behavior (C 5.1.1.2), so this is a true positive. It is low severity, but it is accurate and reported at the right place.