mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix gcc fortify source warnings
Resolve issues uncovered by -D_FORTIFY_SOURCE=2, the default redhat
macro's file adds this option to the cflags. This causes warnings
of the following type designed to keep the developer honest:
warning: ignoring return value of 'foo', declared
with attribute warn_unused_result
The short term fix is to wrap these calls in VERIFY() to check the
return code. The code was already assusing these would never fail.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
@@ -796,7 +796,7 @@ umem_out_of_memory(void)
|
||||
{
|
||||
char errmsg[] = "out of memory -- generating core dump\n";
|
||||
|
||||
write(fileno(stderr), errmsg, sizeof (errmsg));
|
||||
(void) fprintf(stderr, "%s", errmsg);
|
||||
abort();
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user