[PATCH] D35245: [LibFuzzer] Fix GCC `-Wunused-result` warning

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 11:21:39 PDT 2017


delcypher added a comment.

In https://reviews.llvm.org/D35245#805183, @kcc wrote:

> I understand why this is desired in theory, but do we hit any related problem in practice? 
>  If so, is a test possible?


I've not hit problems in practice. My only real aim was to fix the warning. We could just do

  (void) write(2, Str, strlen(str));

instead to suppress the warning. This is "technically wrong" though due to the possibility of not all the bytes of `Str` being written. So I thought I'd code up my solution to that.

I would understand if you don't want to use because it does over complicated the code without any (so far) observable benefit.


https://reviews.llvm.org/D35245





More information about the llvm-commits mailing list