automount: Fix compiler warning
Subsystems (2)
PATCH 1/1 automount: Fix compiler warning
Fix below compiler (gcc5) warning which isn't autoconf result dependent. mounts.c:1779:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
--- lib/mounts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
lib/mounts.c +2 -3
@@ -1776,16 +1776,15 @@ static int remount_active_mount(struct autofs_point *ap, *ioctlfd =-1 ; } }else { -int ret;/* * What can I do if we can't remount the existing * mount(s) (possibly a partial failure), everything * following will be broken? */ if (type == t_indirect) - ret =do_remount_indirect (ap, fd, path); +do_remount_indirect (ap, fd, path);else - ret =do_remount_direct (ap, fd, path); +do_remount_direct (ap, fd, path); }debug (ap->logopt,"re-connected to mount %s" , path);
Signature · 4 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerQuoted 3 lines · Tomohiro Kusumi
Fix below compiler (gcc5) warning which isn't autoconf result dependent. mounts.c:1779:7: warning: variable 'ret' set but not used [-Wunused-but-set -variable]
Indeed, I've been meaning to fix that but I like to have a return assigned even when it's not used so I can easily identify functions that return status when changes are needed, so I've left it alone.
I'm adding this to my list of patches (as is).
Unless there is a pressing need for this to be committed to the upstream repository it will be done the next time I push changes and I can't say when that will be.
Quoted 29 lines
Signed-off-by Tomohiro Kusumi <[email protected]>--- lib/mounts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)lib/mounts.c +2
-3@@ -1776,16 +1776,15 @@ static int remount_active_mount(struct autofs_point *ap, *ioctlfd =-1 ; } }else { -int ret;/* * What can I do if we can't remount the existing * mount(s) (possibly a partial failure), everything * following will be broken? */ if (type == t_indirect) - ret =do_remount_indirect (ap, fd, path); +do_remount_indirect (ap, fd, path);else - ret =do_remount_direct (ap, fd, path); +do_remount_direct (ap, fd, path); }
Quoted 1 line
debug(ap->logopt, "re-connected to mount %s", path);
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Thank you.
Sure, feel free to commit it whenever you can, as it's just a cleanup.
2016-07-06 18:24 GMT+09:00 Ian Kent <[email protected]>:
Quoted 44 lines · Tomohiro Kusumi
Quoted 3 lines
Fix below compiler (gcc5) warning which isn't autoconf result dependent. mounts.c:1779:7: warning: variable 'ret' set but not used [-Wunused-but-set -variable]
Indeed, I've been meaning to fix that but I like to have a return assigned even when it's not used so I can easily identify functions that return status when changes are needed, so I've left it alone.
I'm adding this to my list of patches (as is).
Unless there is a pressing need for this to be committed to the upstream repository it will be done the next time I push changes and I can't say when that will be.
Quoted 29 lines
Signed-off-by Tomohiro Kusumi <[email protected]>--- lib/mounts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)lib/mounts.c +2
-3@@ -1776,16 +1776,15 @@ static int remount_active_mount(struct autofs_point *ap, *ioctlfd =-1 ; } }else { -int ret;/* * What can I do if we can't remount the existing * mount(s) (possibly a partial failure), everything * following will be broken? */ if (type == t_indirect) - ret =do_remount_indirect (ap, fd, path); +do_remount_indirect (ap, fd, path);else - ret =do_remount_direct (ap, fd, path); +do_remount_direct (ap, fd, path); }
Quoted 1 line
Quoted 1 line
debug(ap->logopt, "re-connected to mount %s", path);
--
To unsubscribe from this list: send the line "unsubscribe autofs" in