]> git.ozlabs.org Git - ccan/commitdiff
alignof: fix unused var warning with gcc
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Oct 2012 11:02:54 +0000 (21:32 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Oct 2012 11:02:54 +0000 (21:32 +1030)
/home/rusty/devel/cvs/ccan/ccan/alignof/test/run.c:32:7: warning: variable ‘c2’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/alignof/test/run.c

index 2da69032a49c210670f43683f5b9f4f309abd54e..f36113d18fded305b364f98f5ddd94701be5b660 100644 (file)
@@ -37,8 +37,7 @@ int main(int argc, char *argv[])
        double d;
 
        /* Make sure we use all the variables. */
        double d;
 
        /* Make sure we use all the variables. */
-       c = 0;
-       c2 = c3 = c4 = c;
+       c = c2 = c3 = c4 = 0;
 
        plan_tests(15);
        ok1((unsigned long)&c % ALIGNOF(char) == 0);
 
        plan_tests(15);
        ok1((unsigned long)&c % ALIGNOF(char) == 0);