8717 autofs: parameter/variable set but not used
Review Request #674 - Created Oct. 13, 2017 and submitted
| Information | |
|---|---|
| Toomas Soome | |
| illumos-gate | |
| 8717 | |
| be47c12... | |
| Reviewers | |
| general | |
ns_files.c: In function 'call_read_execout':
ns_files.c:684:37: error: parameter 'lp' set but not used [-Werror=unused-but-set-parameter]
call_read_execout(char *key, char **lp, char *fname, char *line,
^~
autod_nfs.c: In function 'read_default_nfs':
autod_nfs.c:3985:16: error: variable 'lastread' set but not used [-Werror=unused-but-set-variable]
static time_t lastread = 0;
^~~~~~~~
cc1: all warnings being treated as errors
did add entry into auto_master:
/test auto_execand the script has:
root@beastie:/test# more /etc/auto_exec!/bin/sh
echo "localhost:/export/&"
exit 0and verified the mounts are done - so the exec maps are still working as expected.
LGTM
Ship It!
-
usr/src/cmd/fs.d/autofs/ns_files.c (Diff revision 1) -
So why does the compiler complain about this? This feels really weird to me. For parameters, isn't it a common pattern to have output data which will be set and not read?
Review request changed
Change Summary:
a bit more cleanup, we really do not need the lp.
Commit: |
|
||||
|---|---|---|---|---|---|
Diff: |
Revision 2 (+4 -12) |
Review request changed
Change Summary:
call_read_execout is declared static. make it so.
Commit: |
|
||||
|---|---|---|---|---|---|
Diff: |
Revision 3 (+5 -13) |
Ship It!
still LGTM
Review request changed
Change Summary:
updated the testing.
Testing Done: |
|
|---|
Ship It!
