]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
configure: enable -Wunused-but-set-variable
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 1 Dec 2019 16:04:43 +0000 (17:04 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 1 Dec 2019 16:07:25 +0000 (17:07 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac
src/lxc/commands.c

index 19cb1e72e56bc552c177cdbe55e66056a5b8659b..3ef4d37fdbe7057d2937911898bd0a779f3d4c00 100644 (file)
@@ -726,6 +726,7 @@ AX_CHECK_COMPILE_FLAG([-Wlogical-op], [CFLAGS="$CFLAGS -Wlogical-op"],,[-Werror]
 AX_CHECK_COMPILE_FLAG([-Wmissing-include-dirs], [CFLAGS="$CFLAGS -Wmissing-include-dirs"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Wold-style-definition], [CFLAGS="$CFLAGS -Wold-style-definition"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Winit-self], [CFLAGS="$CFLAGS -Winit-self"],,[-Werror])
+AX_CHECK_COMPILE_FLAG([-Wunused-but-set-variable], [CFLAGS="$CFLAGS -Wunused-but-set-variable"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Wfloat-equal], [CFLAGS="$CFLAGS -Wfloat-equal"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Wsuggest-attribute=noreturn], [CFLAGS="$CFLAGS -Wsuggest-attribute=noreturn"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Werror=return-type], [CFLAGS="$CFLAGS -Werror=return-type"],,[-Werror])
index f4920c7846a5137bd17f14a160e8870378c12912..1605fe5e227dca0313598785ddd4970dbdaa5d9e 100644 (file)
@@ -1198,7 +1198,6 @@ static int lxc_cmd_seccomp_notify_add_listener_callback(int fd,
 #ifdef HAVE_SECCOMP_NOTIFY
        int ret;
        __do_close_prot_errno int recv_fd = -EBADF;
-       int notify_fd = -EBADF;
 
        ret = lxc_abstract_unix_recv_fds(fd, &recv_fd, 1, NULL, 0);
        if (ret <= 0) {
@@ -1219,7 +1218,7 @@ static int lxc_cmd_seccomp_notify_add_listener_callback(int fd,
                rsp.ret = -errno;
                goto out;
        }
-       notify_fd = move_fd(recv_fd);
+       move_fd(recv_fd);
 
 out:
 #else