clang -cc1 -cc1 -triple x86_64-suse-linux -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name conftest.cpp -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/c++tools -resource-dir /usr/lib64/clang/15.0.7 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/backward -internal-isystem /usr/lib64/clang/15.0.7/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -fdeprecated-macro -fdebug-compilation-dir=/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/c++tools -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -vectorize-loops -vectorize-slp -analyzer-output=plist-html -analyzer-config silence-checkers=core.NullDereference -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2023-03-27-141847-20772-1/report-B6Mky6.plist -x c++ conftest.cpp
1 | |
2 | #define PACKAGE_NAME "" |
3 | #define PACKAGE_TARNAME "" |
4 | #define PACKAGE_VERSION "" |
5 | #define PACKAGE_STRING "" |
6 | #define PACKAGE_BUGREPORT "" |
7 | #define PACKAGE_URL "" |
8 | #define ENABLE_ASSERT_CHECKING 1 |
9 | #define HOST_HAS_O_CLOEXEC 1 |
10 | #define STDC_HEADERS 1 |
11 | #define HAVE_SYS_TYPES_H 1 |
12 | #define HAVE_SYS_STAT_H 1 |
13 | #define HAVE_STDLIB_H 1 |
14 | #define HAVE_STRING_H 1 |
15 | #define HAVE_MEMORY_H 1 |
16 | #define HAVE_STRINGS_H 1 |
17 | #define HAVE_INTTYPES_H 1 |
18 | #define HAVE_STDINT_H 1 |
19 | #define HAVE_UNISTD_H 1 |
20 | #define HAVE_SYS_MMAN_H 1 |
21 | #define HAVE_AF_UNIX 1 |
22 | |
23 | |
24 | #include <sys/types.h> |
25 | #include <sys/socket.h> |
26 | #include <netinet/in.h> |
27 | #include <netdb.h> |
28 | int |
29 | main () |
30 | { |
31 | |
32 | sockaddr_in6 in6; |
33 | in6.sin6_family = AF_UNSPEC; |
34 | struct addrinfo *addrs = 0; |
35 | struct addrinfo hints; |
36 | hints.ai_flags = 0; |
37 | hints.ai_family = AF_INET6; |
38 | hints.ai_socktype = SOCK_STREAM; |
39 | hints.ai_protocol = 0; |
40 | hints.ai_canonname = 0; |
41 | hints.ai_addr = 0; |
42 | hints.ai_next = 0; |
43 | int e = getaddrinfo ("localhost", 0, &hints, &addrs); |
44 | const char *str = gai_strerror (e); |
| Value stored to 'str' during its initialization is never read |
45 | freeaddrinfo (addrs); |
46 | int fd = socket (AF_INET6, SOCK_STREAM, 0); |
47 | connect (fd, (sockaddr *)&in6, sizeof (in6)); |
48 | ; |
49 | return 0; |
50 | } |