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)
Sat, Jan 10, 12:13 PM
Unknown Object (File)
Thu, Jan 8, 7:00 PM
Unknown Object (File)
Thu, Dec 25, 4:25 AM
Unknown Object (File)
Nov 21 2025, 8:51 AM
Unknown Object (File)
Nov 21 2025, 2:59 AM
Unknown Object (File)
Nov 21 2025, 2:57 AM
Unknown Object (File)
Nov 21 2025, 2:57 AM
Unknown Object (File)
Nov 21 2025, 2:54 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 Passed
Unit
No Test Coverage
Build Status
Buildable 2354
Build 2370: arc lint + arc unit

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.