selinux/mcstrans
Stephen Smalley 6e4bb702af mcstrans: fix clang warnings
Fix the following warnings from clang.

mcstrans.c:1309:6: warning: variable 'groups' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (violates_constraints(l)) {
            ^~~~~~~~~~~~~~~~~~~~~~~
mcstrans.c:1491:9: note: uninitialized use occurs here
        while (groups)
               ^~~~~~
mcstrans.c:1309:2: note: remove the 'if' if its condition is always false
        if (violates_constraints(l)) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mcstrans.c:1303:6: warning: variable 'groups' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (!l)
            ^~
mcstrans.c:1491:9: note: uninitialized use occurs here
        while (groups)
               ^~~~~~
mcstrans.c:1303:2: note: remove the 'if' if its condition is always false
        if (!l)
        ^~~~~~~
mcstrans.c:1299:6: warning: variable 'groups' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (!level)
            ^~~~~~
mcstrans.c:1491:9: note: uninitialized use occurs here
        while (groups)
               ^~~~~~
mcstrans.c:1299:2: note: remove the 'if' if its condition is always false
        if (!level)
        ^~~~~~~~~~~
mcstrans.c:1316:2: note: variable 'groups' is declared here
        word_group_t *groups = NULL;
        ^
3 warnings generated.
mcscolor.c:334:24: warning: size argument in 'strncat' call appears to be size of the source [-Wstrncat-size]
                strncat(result, buf, sizeof(buf));

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2016-11-16 11:19:51 -05:00
..
man Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
share Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
src mcstrans: fix clang warnings 2016-11-16 11:19:51 -05:00
utils Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
ChangeLog Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
COPYING Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
Makefile mcstrans: Add a relabel target. 2016-11-16 11:19:51 -05:00
TODO Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
VERSION Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00