[PATCH FOR REVIEW]: Fix warning in src/share/vm/adlc/archDesc.cpp

David Holmes - Sun Microsystems David.Holmes at Sun.COM
Sat Sep 5 04:36:47 PDT 2009


Christian Thalinger said the following on 09/05/09 18:59:
> Well, looking more closely it's actually a system header attribute that
> brings up that warning:
> 
> /mnt/builder/icedtea7/openjdk-ecj/hotspot/src/share/vm/adlc/archDesc.cpp:1034:
> error: ignoring return value of 'size_t fwrite(const void*, size_t,
> size_t, FILE*)', declared with attribute warn_unused_result
> 
> And it seems there is no GCC switch to turn that warning off (except
> -O0).  Maybe we should check for the written bytes to be the same as
> requested:
> 
>   assert(count == size, "copyright info truncated");

I recall this coming up in the past. gcc manual lists:

-Wno-unused-result

but that might be version specific.

David


More information about the hotspot-dev mailing list