提交 de2533ec 编写于 作者: A andrew

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
上级 8da3d513
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册