Bug Summary

File:objdir/gcc/conftest.cpp
Warning:line 221, column 13
Value stored to 'str' during its initialization is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name conftest.cpp -analyzer-store=region -analyzer-opt-analyze-nested-blocks -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 static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/lib64/clang/11.0.0 -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/11.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -analyzer-output=plist-html -analyzer-config silence-checkers=core.NullDereference -faddrsig -o /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2021-01-16-135054-17580-1/report-TtjpDC.plist -x c++ conftest.cpp
1/* confdefs.h */
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_STDLIB_OPTION0 0
9#define STDC_HEADERS1 1
10#define HAVE_SYS_TYPES_H1 1
11#define HAVE_SYS_STAT_H1 1
12#define HAVE_STDLIB_H1 1
13#define HAVE_STRING_H1 1
14#define HAVE_MEMORY_H1 1
15#define HAVE_STRINGS_H1 1
16#define HAVE_INTTYPES_H1 1
17#define HAVE_STDINT_H1 1
18#define HAVE_UNISTD_H1 1
19#define __EXTENSIONS__1 1
20#define _ALL_SOURCE1 1
21#define _GNU_SOURCE1 1
22#define _POSIX_PTHREAD_SEMANTICS1 1
23#define _TANDEM_SOURCE1 1
24#define SIZEOF_VOID_P8 8
25#define SIZEOF_SHORT2 2
26#define SIZEOF_INT4 4
27#define SIZEOF_LONG8 8
28#define HAVE_LONG_LONG1 1
29#define SIZEOF_LONG_LONG8 8
30#define HAVE_UNSIGNED_LONG_LONG_INT1 1
31#define HAVE_LONG_LONG_INT1 1
32#define HAVE_INTMAX_T1 1
33#define HAVE_INTPTR_T1 1
34#define HAVE_UINTMAX_T1 1
35#define HAVE_UINTPTR_T1 1
36#define INT64_T_IS_LONG1 1
37#define HAVE_SWAP_IN_UTILITY1 1
38#define CHECKING_P1 1
39#define ENABLE_EXTRA_CHECKING1 1
40#define ENABLE_ASSERT_CHECKING1 1
41#define ENABLE_GIMPLE_CHECKING1 1
42#define ENABLE_RUNTIME_CHECKING1 1
43#define ENABLE_TREE_CHECKING1 1
44#define ENABLE_TYPES_CHECKING1 1
45#define ENABLE_RTL_FLAG_CHECKING1 1
46#define ENABLE_GC_CHECKING1 1
47#define HAVE_VALGRIND_MEMCHECK_H1 1
48#define GATHER_STATISTICS0 0
49#define DEFAULT_STK_CLASH_GUARD_SIZE0 0
50#define ENABLE_DECIMAL_FLOAT1 1
51#define ENABLE_DECIMAL_BID_FORMAT1 1
52#define ENABLE_FIXED_POINT0 0
53#define ENABLE_VTABLE_VERIFY0 0
54#define ENABLE_ANALYZER1 1
55#define DOCUMENTATION_ROOT_URL"https://gcc.gnu.org/onlinedocs/" "https://gcc.gnu.org/onlinedocs/"
56#define CHANGES_ROOT_URL"https://gcc.gnu.org/" "https://gcc.gnu.org/"
57#define OFFLOAD_TARGETS"" ""
58#define ENABLE_OFFLOADING0 0
59#define STDC_HEADERS1 1
60#define TIME_WITH_SYS_TIME1 1
61#define STRING_WITH_STRINGS1 1
62#define HAVE_SYS_WAIT_H1 1
63#define GWINSZ_IN_SYS_IOCTL1 1
64#define HAVE_LIMITS_H1 1
65#define HAVE_STDDEF_H1 1
66#define HAVE_STRING_H1 1
67#define HAVE_STRINGS_H1 1
68#define HAVE_STDLIB_H1 1
69#define HAVE_TIME_H1 1
70#define HAVE_ICONV_H1 1
71#define HAVE_FCNTL_H1 1
72#define HAVE_FTW_H1 1
73#define HAVE_UNISTD_H1 1
74#define HAVE_SYS_FILE_H1 1
75#define HAVE_SYS_TIME_H1 1
76#define HAVE_SYS_MMAN_H1 1
77#define HAVE_SYS_RESOURCE_H1 1
78#define HAVE_SYS_PARAM_H1 1
79#define HAVE_SYS_TIMES_H1 1
80#define HAVE_SYS_STAT_H1 1
81#define HAVE_MALLOC_H1 1
82#define HAVE_LANGINFO_H1 1
83#define HAVE_LOCALE_H1 1
84#define HAVE_WCHAR_H1 1
85#define HAVE_UNORDERED_MAP1 1
86#define HAVE_TR1_UNORDERED_MAP1 1
87#define HAVE_EXT_HASH_MAP1 1
88#define HAVE_INTTYPES_H1 1
89#define HAVE_ZSTD_H1 1
90#define HAVE_TIMES1 1
91#define HAVE_CLOCK1 1
92#define HAVE_KILL1 1
93#define HAVE_GETRLIMIT1 1
94#define HAVE_SETRLIMIT1 1
95#define HAVE_POPEN1 1
96#define HAVE_SYSCONF1 1
97#define HAVE_STRSIGNAL1 1
98#define HAVE_GETRUSAGE1 1
99#define HAVE_NL_LANGINFO1 1
100#define HAVE_GETTIMEOFDAY1 1
101#define HAVE_MBSTOWCS1 1
102#define HAVE_WCSWIDTH1 1
103#define HAVE_MMAP1 1
104#define HAVE_POSIX_FALLOCATE1 1
105#define HAVE_SETLOCALE1 1
106#define HAVE_CLEARERR_UNLOCKED1 1
107#define HAVE_FEOF_UNLOCKED1 1
108#define HAVE_FERROR_UNLOCKED1 1
109#define HAVE_FFLUSH_UNLOCKED1 1
110#define HAVE_FGETC_UNLOCKED1 1
111#define HAVE_FGETS_UNLOCKED1 1
112#define HAVE_FILENO_UNLOCKED1 1
113#define HAVE_FPUTC_UNLOCKED1 1
114#define HAVE_FPUTS_UNLOCKED1 1
115#define HAVE_FREAD_UNLOCKED1 1
116#define HAVE_FWRITE_UNLOCKED1 1
117#define HAVE_GETCHAR_UNLOCKED1 1
118#define HAVE_GETC_UNLOCKED1 1
119#define HAVE_PUTCHAR_UNLOCKED1 1
120#define HAVE_PUTC_UNLOCKED1 1
121#define HAVE_MADVISE1 1
122#define HAVE_MALLINFO1 1
123#define HAVE_FSTATAT1 1
124#define HAVE_WORKING_MBSTOWCS1 1
125#define HAVE_MMAP_FILE1 1
126#define HAVE_MMAP_DEV_ZERO1 1
127#define HAVE_MMAP_ANON1 1
128#define HAVE_FORK1 1
129#define HAVE_VFORK1 1
130#define HAVE_WORKING_VFORK1 1
131#define HAVE_WORKING_FORK1 1
132#define HAVE_ICONV1 1
133#define ICONV_CONST
134#define HAVE_LC_MESSAGES1 1
135#define HAVE_LANGINFO_CODESET1 1
136#define HAVE_DECL_BASENAME1 1
137#define HAVE_DECL_STRSTR1 1
138#define HAVE_DECL_GETENV1 1
139#define HAVE_DECL_ATOL1 1
140#define HAVE_DECL_ATOLL1 1
141#define HAVE_DECL_ASPRINTF1 1
142#define HAVE_DECL_SBRK1 1
143#define HAVE_DECL_ABORT1 1
144#define HAVE_DECL_ATOF1 1
145#define HAVE_DECL_GETCWD1 1
146#define HAVE_DECL_GETWD1 1
147#define HAVE_DECL_MADVISE1 1
148#define HAVE_DECL_STPCPY1 1
149#define HAVE_DECL_STRNLEN1 1
150#define HAVE_DECL_STRSIGNAL1 1
151#define HAVE_DECL_STRVERSCMP1 1
152#define HAVE_DECL_STRTOL1 1
153#define HAVE_DECL_STRTOUL1 1
154#define HAVE_DECL_STRTOLL1 1
155#define HAVE_DECL_STRTOULL1 1
156#define HAVE_DECL_SETENV1 1
157#define HAVE_DECL_UNSETENV1 1
158#define HAVE_DECL_ERRNO1 1
159#define HAVE_DECL_SNPRINTF1 1
160#define HAVE_DECL_VSNPRINTF1 1
161#define HAVE_DECL_VASPRINTF1 1
162#define HAVE_DECL_MALLOC1 1
163#define HAVE_DECL_REALLOC1 1
164#define HAVE_DECL_CALLOC1 1
165#define HAVE_DECL_FREE1 1
166#define HAVE_DECL_GETOPT1 1
167#define HAVE_DECL_CLOCK1 1
168#define HAVE_DECL_GETPAGESIZE1 1
169#define HAVE_DECL_FFS1 1
170#define HAVE_DECL_CLEARERR_UNLOCKED1 1
171#define HAVE_DECL_FEOF_UNLOCKED1 1
172#define HAVE_DECL_FERROR_UNLOCKED1 1
173#define HAVE_DECL_FFLUSH_UNLOCKED1 1
174#define HAVE_DECL_FGETC_UNLOCKED1 1
175#define HAVE_DECL_FGETS_UNLOCKED1 1
176#define HAVE_DECL_FILENO_UNLOCKED1 1
177#define HAVE_DECL_FPRINTF_UNLOCKED0 0
178#define HAVE_DECL_FPUTC_UNLOCKED1 1
179#define HAVE_DECL_FPUTS_UNLOCKED1 1
180#define HAVE_DECL_FREAD_UNLOCKED1 1
181#define HAVE_DECL_FWRITE_UNLOCKED1 1
182#define HAVE_DECL_GETCHAR_UNLOCKED1 1
183#define HAVE_DECL_GETC_UNLOCKED1 1
184#define HAVE_DECL_PUTCHAR_UNLOCKED1 1
185#define HAVE_DECL_PUTC_UNLOCKED1 1
186#define HAVE_DECL_GETRLIMIT1 1
187#define HAVE_DECL_SETRLIMIT1 1
188#define HAVE_DECL_GETRUSAGE1 1
189#define HAVE_DECL_MALLINFO1 1
190#define HAVE_DECL_MALLINFO20 0
191#define HAVE_DECL_LDGETNAME0 0
192#define HAVE_DECL_TIMES1 1
193#define HAVE_DECL_SIGALTSTACK1 1
194#define HAVE_STRUCT_TMS1 1
195#define HAVE_CLOCK_T1 1
196#define HOST_HAS_F_SETLKW1 1
197#define HOST_HAS_O_CLOEXEC1 1
198#define HAVE_AF_UNIX1 1
199/* end confdefs.h. */
200
201#include <sys/types.h>
202#include <sys/socket.h>
203#include <netinet/in.h>
204#include <netdb.h>
205int
206main ()
207{
208
209sockaddr_in6 in6;
210in6.sin6_family = AF_UNSPEC0;
211struct addrinfo *addrs = 0;
212struct addrinfo hints;
213hints.ai_flags = 0;
214hints.ai_family = AF_INET610;
215hints.ai_socktype = SOCK_STREAMSOCK_STREAM;
216hints.ai_protocol = 0;
217hints.ai_canonname = 0;
218hints.ai_addr = 0;
219hints.ai_next = 0;
220int e = getaddrinfo ("localhost", 0, &hints, &addrs);
221const char *str = gai_strerror (e);
Value stored to 'str' during its initialization is never read
222freeaddrinfo (addrs);
223int fd = socket (AF_INET610, SOCK_STREAMSOCK_STREAM, 0);
224connect (fd, (sockaddr *)&in6, sizeof (in6));
225 ;
226 return 0;
227}