contrib/fuse-lib: Fix compiler warning within switch case
Following warning is shown when compiled with gcc v7: mount.c: In function ‘gf_fuse_unmount_daemon’: mount.c:98:22: warning: statement will never be executed [-Wswitch-unreachable] char c = 0; ^ CCLD fuse.la We just need to move the relevant declaration statements to that switch case where it is valid and is being used. Change-Id: I8e50cc7cfcfc3bc88218cd69abbf516c08ee1648 Updates: #259 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: https://review.gluster.org/17878 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
This commit is contained in:
parent
747a08d34e
commit
071559cb47
@ -95,9 +95,10 @@ gf_fuse_unmount_daemon (const char *mountpoint, int fd)
|
||||
|
||||
pid = fork ();
|
||||
switch (pid) {
|
||||
case 0:
|
||||
{
|
||||
char c = 0;
|
||||
sigset_t sigset;
|
||||
case 0:
|
||||
|
||||
close_fds_except (ump, 1);
|
||||
|
||||
@ -110,6 +111,7 @@ gf_fuse_unmount_daemon (const char *mountpoint, int fd)
|
||||
|
||||
gf_fuse_unmount (mountpoint, fd);
|
||||
exit (0);
|
||||
}
|
||||
case -1:
|
||||
close (fd);
|
||||
fd = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user