Commit 648bc88
committed
malloc.c: silence "unused result" compiler warning
Before:
malloc.c: In function ‘getpages’:
malloc.c:273:34: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
273 | # define fatalcroak(mess) (write(2, (mess), strlen(mess)), exit(2))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
malloc.c:1546:21: note: in expansion of macro ‘fatalcroak’
1546 | fatalcroak("panic: Off-page sbrk\n");
| ^~~~~~~~~~
malloc.c:273:34: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
273 | # define fatalcroak(mess) (write(2, (mess), strlen(mess)), exit(2))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
malloc.c:1585:13: note: in expansion of macro ‘fatalcroak’
1585 | fatalcroak("Misalignment of sbrk()\n");
| ^~~~~~~~~~
gcc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c99 -O2 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -Wno-use-after-free universal.c
(The "make depend" comment was overlooked in commit b9e5552.)1 parent a5ccef6 commit 648bc88
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
0 commit comments