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)
Fri, Nov 22, 8:44 PM
Unknown Object (File)
Nov 16 2024, 10:33 PM
Unknown Object (File)
Sep 23 2024, 2:10 AM
Unknown Object (File)
Sep 22 2024, 11:07 PM
Unknown Object (File)
Sep 22 2024, 10:57 PM
Unknown Object (File)
Sep 19 2024, 4:37 AM
Unknown Object (File)
Sep 19 2024, 12:38 AM
Unknown Object (File)
Sep 13 2024, 11:11 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 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.