llvm.org GIT mirror llvm / 6bbba3c
Fix for warnings: ignoring return value of ‘write’, declared with attribute warn_unused_result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140314 91177308-0d34-0410-b5e6-96231b3b80d8 Galina Kistanova 8 years ago
1 changed file(s) with 12 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
101101 {
102102 int PTy = ArgumentInfo;
103103 int Zeros = 0;
104 write(OutFile, &PTy, sizeof(int));
105 write(OutFile, &SavedArgsLength, sizeof(unsigned));
106 write(OutFile, SavedArgs, SavedArgsLength);
104 if (write(OutFile, &PTy, sizeof(int)) < 0 ||
105 write(OutFile, &SavedArgsLength, sizeof(unsigned)) < 0 ||
106 write(OutFile, SavedArgs, SavedArgsLength) < 0 ) {
107 fprintf(stderr,"error: unable to write to output file.");
108 exit(0);
109 }
107110 /* Pad out to a multiple of four bytes */
108 if (SavedArgsLength & 3)
109 write(OutFile, &Zeros, 4-(SavedArgsLength&3));
111 if (SavedArgsLength & 3) {
112 if (write(OutFile, &Zeros, 4-(SavedArgsLength&3)) < 0) {
113 fprintf(stderr,"error: unable to write to output file.");
114 exit(0);
115 }
116 }
110117 }
111118 }
112119 return(OutFile);