Page MenuHomeFreeBSD

Delete argsize to fix a -Wunused-but-set-variable warning with gcc 4.9
ClosedPublic

Authored by ngie on Feb 1 2016, 7:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 1:58 PM
Unknown Object (File)
Thu, Apr 25, 1:56 PM
Unknown Object (File)
Thu, Apr 25, 1:56 PM
Unknown Object (File)
Thu, Apr 25, 7:28 AM
Unknown Object (File)
Apr 2 2024, 12:41 AM
Unknown Object (File)
Mar 22 2024, 8:46 PM
Unknown Object (File)
Mar 22 2024, 8:46 PM
Unknown Object (File)
Mar 22 2024, 8:46 PM
Subscribers

Details

Summary

Delete argsize to fix a -Wunused-but-set-variable warning with gcc 4.9

The variable isn't actually checked -- just the end result which gets returned
from the function

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ngie retitled this revision from to Delete argsize to fix a -Wunused-but-set-variable warning with gcc 4.9.
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)
ngie added a reviewer: delphij.
ngie added a subscriber: araujo.

Not sure about this change, because if asprintf() can't allocate sufficient memory it will return -1. Maybe a (void)asprintf(.....) could be better. I guess that int is there to silent the -1 return.

delphij edited edge metadata.

I've no idea what I was thinking about :-/ but your change is good.

This revision is now accepted and ready to land.Feb 1 2016, 7:57 AM

Not sure about this change, because if asprintf() can't allocate sufficient memory it will return -1. Maybe a (void)asprintf(.....) could be better. I guess that int is there to silent the -1 return.

I'll add (void) for clarity -- thanks for the feedback :).

This revision was automatically updated to reflect the committed changes.