dblaikie added a comment.

In D100581#2730557 <https://reviews.llvm.org/D100581#2730557>, @nickdesaulniers 
wrote:

> 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;
>         ^

Any idea what the purpose of this code is/why it's not a reasonable thing to 
warn on?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to