Remove unnecessary local variable in kdbus tests 64/270264/1 submit/tizen/20220127.090529
authorHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 27 Jan 2022 08:25:22 +0000 (17:25 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 27 Jan 2022 08:25:47 +0000 (17:25 +0900)
[  230s] kdbus-test.c: In function 'main':
[  230s] kdbus-test.c:972:31: error: declaration of 't' shadows a previous local [-Werror=shadow]
[  230s]   972 |      const struct kdbus_test *t = &tests[i];
[  230s]       |                               ^
[  230s] kdbus-test.c:892:6: note: shadowed declaration is here
[  230s]   892 |  int t, ret = 0;
[  230s]       |      ^
[  230s] cc1: all warnings being treated as errors

Change-Id: I688feaa00630509363718f2d871adec3c2b951c7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
tests/kdbus/kdbus-test.c

index 5cd9301..a2650b2 100644 (file)
@@ -969,8 +969,7 @@ wur int main(int argc, char *argv[])
                        {
                                unsigned i = 0;
                                do {
-                                       const struct kdbus_test *t = &tests[i];
-                                       printf("%s;%s\n", t->name, t->desc);
+                                       printf("%s;%s\n", tests[i].name, tests[i].desc);
                                } while (++i < TABSIZE(tests)-1);
                        }
                        return 0;