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)
Sun, Jun 9, 7:05 AM
Unknown Object (File)
Sun, Jun 9, 5:39 AM
Unknown Object (File)
Sat, Jun 1, 6:14 PM
Unknown Object (File)
Fri, May 17, 9:37 PM
Unknown Object (File)
Apr 25 2024, 1:58 PM
Unknown Object (File)
Apr 25 2024, 1:56 PM
Unknown Object (File)
Apr 25 2024, 1:56 PM
Unknown Object (File)
Apr 25 2024, 7:28 AM
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.