mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6879689: Fix warning about ignored return value when compiling with -O2
Store the return value of fwrite and check it matches the size of the array. Reviewed-by: twisti, dholmes
This commit is contained in:
parent
ab4b4a6433
commit
9cbfcde9a7
1 changed files with 2 additions and 1 deletions
|
@ -1031,7 +1031,8 @@ void ArchDesc::initBaseOpTypes() {
|
|||
//---------------------------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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue