]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
newgrp: delete dead code
authorikerexxe <ipedrosa@redhat.com>
Tue, 27 Oct 2020 10:33:46 +0000 (11:33 +0100)
committerikerexxe <ipedrosa@redhat.com>
Tue, 27 Oct 2020 10:42:08 +0000 (11:42 +0100)
covscan issue:
Error: CLANG_WARNING: [#def31]
src/newgrp.c:448:2: warning: Value stored to 'gid' is never read [deadcode.DeadStores]
gid = getgid ();

src/newgrp.c

index e3c44e143a1c8f5977d94adc724ff5cd20fabba7..76f3ce7b850e3da7336f0b6e3a06fbd13fd890db 100644 (file)
@@ -445,7 +445,6 @@ int main (int argc, char **argv)
        Prog = Basename (argv[0]);
        is_newgrp = (strcmp (Prog, "newgrp") == 0);
        OPENLOG (is_newgrp ? "newgrp" : "sg");
-       gid = getgid ();
        argc--;
        argv++;