]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: make clang analyzer happy
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 27 Jun 2017 18:33:28 +0000 (20:33 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 29 Jun 2017 12:04:21 +0000 (14:04 +0200)
commita25fb9e8ec534589bcc9f2fb45b4dfdc4d1084f7
tree0de2b9c0b92b56dc7cd2ddcd4b68af69ee621b29
parent81435af3be9de47fd74dff0c5e0a6add7c66ae9b
lscpu: make clang analyzer happy

Let read_nodes() work on uninitialized structs to silence these two
warnings:

  CC       sys-utils/lscpu-lscpu.o
warning: Path diagnostic report is not generated. Current output format does not support diagnostics that cross file boundaries. Refer to --analyzer-output for valid output formats
In file included from sys-utils/lscpu.c:63:
./include/xalloc.h:32:21: warning: Call to 'malloc' has an allocation size of 0 bytes
        void *ret = malloc(size);
                    ^~~~~~~~~~~~
sys-utils/lscpu.c:1468:23: warning: Function call argument is an uninitialized value
                desc->nodemaps[i] = path_read_cpuset(maxcpus,
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
sys-utils/lscpu.c