Mercurial > hg > openjdk > jdk6 > hotspot
changeset 1141:6ee696377676
6879689: Fix warning about ignored return value when compiling with -O2
Summary: Store the return value of fwrite and check it matches the size of the array.
Reviewed-by: twisti, dholmes
author | andrew |
---|---|
date | Tue, 08 Sep 2009 09:01:16 +0100 |
parents | 577f7204441a |
children | 131295e4931b |
files | src/share/vm/adlc/archDesc.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/adlc/archDesc.cpp Mon Mar 15 14:28:58 2010 -0400 +++ b/src/share/vm/adlc/archDesc.cpp Tue Sep 08 09:01:16 2009 +0100 @@ -1030,7 +1030,8 @@ //---------------------------addSUNcopyright------------------------------- // output SUN copyright info void ArchDesc::addSunCopyright(char* legal, int size, FILE *fp) { - fwrite(legal, size, 1, fp); + size_t count = fwrite(legal, 1, size, fp); + assert(count == (size_t) size, "copyright info truncated"); fprintf(fp,"\n"); fprintf(fp,"// Machine Generated File. Do Not Edit!\n"); fprintf(fp,"\n");