[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 30 15:01:57 PDT 2021
nickdesaulniers added a comment.
I see lots of instances from the kernel that look like this when reduced:
$ cat foo.c
int page;
int put_page_testzero(int);
void foo (void) {
int zeroed;
zeroed = put_page_testzero(page);
((void)(sizeof(( long)(!zeroed))));
}
$ clang -c -Wall foo.c
foo.c:4:7: warning: variable 'zeroed' set but not used [-Wunused-but-set-variable]
int zeroed;
^
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100581/new/
https://reviews.llvm.org/D100581
More information about the cfe-commits
mailing list