]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/clone3: remove unused variables
authorKonstantin Khorenko <khorenko@virtuozzo.com>
Sun, 24 May 2026 16:35:50 +0000 (19:35 +0300)
committerChristian Brauner <brauner@kernel.org>
Wed, 27 May 2026 12:11:41 +0000 (14:11 +0200)
  clone3_cap_checkpoint_restore.c: In function 'call_clone3_set_tid':
  clone3_cap_checkpoint_restore.c:57:22: warning: unused variable 'tmp'
  [-Wunused-variable]
     57 |                 char tmp = 0;
        |                      ^~~
  clone3_cap_checkpoint_restore.c:56:21: warning: unused variable 'ret'
  [-Wunused-variable]
     56 |                 int ret;
        |                     ^~~
  clone3_cap_checkpoint_restore.c: In function 'clone3_cap_checkpoint_restore':
  clone3_cap_checkpoint_restore.c:138:13: warning: unused variable 'ret'
  [-Wunused-variable]
    138 |         int ret = 0;
        |             ^~~

Remove unused variables 'ret' and 'tmp' to fix -Wunused-variable
warnings.

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Link: https://patch.msgid.link/20260524163840.34247-3-eva.kurchatova@virtuozzo.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c

index 49fb2edd5a7daf2276a8d6913f524d1661304de2..ab62bcf4107d5a00764d23cb3aa838f7ceb10aed 100644 (file)
@@ -53,9 +53,6 @@ static int call_clone3_set_tid(struct __test_metadata *_metadata,
        }
 
        if (pid == 0) {
-               int ret;
-               char tmp = 0;
-
                TH_LOG("I am the child, my PID is %d (expected %d)", getpid(), set_tid[0]);
 
                if (set_tid[0] != getpid())
@@ -125,7 +122,6 @@ TEST(clone3_cap_checkpoint_restore)
 {
        pid_t pid;
        int status;
-       int ret = 0;
        pid_t set_tid[1];
 
        test_clone3_supported();