Skip to content

Commit 7ae4fce

Browse files
committed
style: ignoring cert-err33-c linting warnings
cert-err33-c Warns on unused function return values. Many of the standard library functions return a value that indicates if the call was successful. Ignoring the returned value can cause unexpected behavior if an error has occurred. The following functions are checked: This check is an alias of check bugprone-unused-return-value with a fixed set of functions. The check corresponds to a part of CERT C Coding Standard rule ERR33-C. Detect and handle standard library errors. The list of checked functions is taken from the rule, with following exception: The check can not differentiate if a function is called with NULL argument. Therefore the following functions are not checked: mblen, mbrlen, mbrtowc, mbtowc, wctomb, wctomb_s https://clang.llvm.org/extra/clang-tidy/checks/cert/err33-c.html
1 parent 961f773 commit 7ae4fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fix-formatting:
3939

4040
linting:
4141
FROM +clang-base
42-
RUN find "./src" "./tests" -type f -name "*.c" | xargs -I {} clang-tidy --checks="*,-llvmlibc-restrict-system-libc-headers,-altera-id-dependent-backward-branch,-altera-unroll-loops" --warnings-as-errors="*" "{}"
42+
RUN find "./src" "./tests" -type f -name "*.c" | xargs -I {} clang-tidy --checks="*,-llvmlibc-restrict-system-libc-headers,-altera-id-dependent-backward-branch,-altera-unroll-loops,-cert-err33-c" --warnings-as-errors="*" "{}"
4343

4444

4545
archlinux-base:

0 commit comments

Comments
 (0)