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
F171446718: D5156.diff
Fri, Sep 11, 4:19 AM
F171414157: D5156.id12922.diff
Fri, Sep 11, 12:17 AM
Unknown Object (File)
Thu, Sep 10, 7:36 AM
Unknown Object (File)
Thu, Sep 10, 7:36 AM
Unknown Object (File)
Sun, Sep 6, 2:51 PM
Unknown Object (File)
Sat, Sep 5, 2:21 PM
Unknown Object (File)
Sat, Sep 5, 1:10 PM
Unknown Object (File)
Sat, Sep 5, 8: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.