comparison src/share/vm/adlc/archDesc.cpp @ 968:5fdbe2cdf565

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 7bb995fbd3c0
children c18cbe5936b8
comparison
equal deleted inserted replaced
918:6ab1d6ece8bd 968:5fdbe2cdf565
1029 1029
1030 1030
1031 //---------------------------addSUNcopyright------------------------------- 1031 //---------------------------addSUNcopyright-------------------------------
1032 // output SUN copyright info 1032 // output SUN copyright info
1033 void ArchDesc::addSunCopyright(char* legal, int size, FILE *fp) { 1033 void ArchDesc::addSunCopyright(char* legal, int size, FILE *fp) {
1034 fwrite(legal, size, 1, fp); 1034 size_t count = fwrite(legal, 1, size, fp);
1035 assert(count == (size_t) size, "copyright info truncated");
1035 fprintf(fp,"\n"); 1036 fprintf(fp,"\n");
1036 fprintf(fp,"// Machine Generated File. Do Not Edit!\n"); 1037 fprintf(fp,"// Machine Generated File. Do Not Edit!\n");
1037 fprintf(fp,"\n"); 1038 fprintf(fp,"\n");
1038 } 1039 }
1039 1040