Bug Summary

File:src/usr.sbin/unbound/obj/conftest.c
Warning:line 71, column 3
Value stored to 'pcpcc' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple amd64-unknown-openbsd7.0 -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name conftest.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -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 -mrelocation-model pic -pic-level 1 -pic-is-pie -mframe-pointer=all -relaxed-aliasing -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-feature +retpoline-indirect-calls -target-feature +retpoline-indirect-branches -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/usr/src/usr.sbin/unbound/obj -resource-dir /usr/local/lib/clang/13.0.0 -internal-isystem /usr/local/lib/clang/13.0.0/include -internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir=/usr/src/usr.sbin/unbound/obj -ferror-limit 19 -fwrapv -D_RET_PROTECTOR -ret-protector -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -fno-builtin-strdup -fno-builtin-strndup -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/ben/Projects/vmm/scan-build/2022-01-12-194120-40624-1 -x c conftest.c
1/* confdefs.h */
2#define PACKAGE_NAME"unbound" "unbound"
3#define PACKAGE_TARNAME"unbound" "unbound"
4#define PACKAGE_VERSION"1.13.2" "1.13.2"
5#define PACKAGE_STRING"unbound 1.13.2" "unbound 1.13.2"
6#define PACKAGE_BUGREPORT"unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues" "unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues"
7#define PACKAGE_URL"" ""
8#define CONFCMDLINE"--enable-allsymbols --with-ssl=/usr --with-libevent=/usr --with-libexpat=/usr --without-pythonmodule --with-chroot-dir=/var/unbound --with-pidfile= --with-rootkey-file=/var/unbound/db/root.key --with-conf-file=/var/unbound/etc/unbound.conf --with-username=_unbound --disable-shared --disable-explicit-port-randomisation --without-pthreads" "--enable-allsymbols --with-ssl=/usr --with-libevent=/usr --with-libexpat=/usr --without-pythonmodule --with-chroot-dir=/var/unbound --with-pidfile= --with-rootkey-file=/var/unbound/db/root.key --with-conf-file=/var/unbound/etc/unbound.conf --with-username=_unbound --disable-shared --disable-explicit-port-randomisation --without-pthreads"
9#define HAVE_STDIO_H1 1
10#define HAVE_STDLIB_H1 1
11#define HAVE_STRING_H1 1
12#define HAVE_INTTYPES_H1 1
13#define HAVE_STDINT_H1 1
14#define HAVE_STRINGS_H1 1
15#define HAVE_SYS_STAT_H1 1
16#define HAVE_SYS_TYPES_H1 1
17#define HAVE_UNISTD_H1 1
18#define HAVE_WCHAR_H1 1
19#define STDC_HEADERS1 1
20#define _ALL_SOURCE1 1
21#define _DARWIN_C_SOURCE1 1
22#define _GNU_SOURCE1 1
23#define _HPUX_ALT_XOPEN_SOCKET_API1 1
24#define _NETBSD_SOURCE1 1
25#define _OPENBSD_SOURCE1 1
26#define _POSIX_PTHREAD_SEMANTICS1 1
27#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__1 1
28#define __STDC_WANT_IEC_60559_BFP_EXT__1 1
29#define __STDC_WANT_IEC_60559_DFP_EXT__1 1
30#define __STDC_WANT_IEC_60559_FUNCS_EXT__1 1
31#define __STDC_WANT_IEC_60559_TYPES_EXT__1 1
32#define __STDC_WANT_LIB_EXT2__1 1
33#define __STDC_WANT_MATH_SPEC_FUNCS__1 1
34#define _TANDEM_SOURCE1 1
35#define __EXTENSIONS__1 1
36#define CONFIGFILE"/var/unbound/etc/unbound.conf" "/var/unbound/etc/unbound.conf"
37#define RUN_DIR"/var/unbound/etc" "/var/unbound/etc"
38#define CHROOT_DIR"/var/unbound" "/var/unbound"
39#define SHARE_DIR"/var/unbound/etc" "/var/unbound/etc"
40#define PIDFILE"" ""
41#define ROOT_ANCHOR_FILE"/var/unbound/db/root.key" "/var/unbound/db/root.key"
42#define ROOT_CERT_FILE"/var/unbound/etc/icannbundle.pem" "/var/unbound/etc/icannbundle.pem"
43#define UB_USERNAME"_unbound" "_unbound"
44#define WINVER0x0502 0x0502
45#define RSRC_PACKAGE_VERSION1,13,2,0 1,13,2,0
46/* end confdefs.h. */
47
48int
49main (void)
50{
51
52#ifndef __cplusplus
53 /* Ultrix mips cc rejects this sort of thing. */
54 typedef int charset[2];
55 const charset cs = { 0, 0 };
56 /* SunOS 4.1.1 cc rejects this. */
57 char const *const *pcpcc;
58 char **ppc;
59 /* NEC SVR4.0.2 mips cc rejects this. */
60 struct point {int x, y;};
61 static struct point const zero = {0,0};
62 /* IBM XL C 1.02.0.0 rejects this.
63 It does not let you subtract one const X* pointer from another in
64 an arm of an if-expression whose if-part is not a constant
65 expression */
66 const char *g = "string";
67 pcpcc = &g + (g ? g-g : 0);
68 /* HPUX 7.0 cc rejects these. */
69 ++pcpcc;
70 ppc = (char**) pcpcc;
71 pcpcc = (char const *const *) ppc;
Value stored to 'pcpcc' is never read
72 { /* SCO 3.2v4 cc rejects this sort of thing. */
73 char tx;
74 char *t = &tx;
75 char const *s = 0 ? (char *) 0 : (char const *) 0;
76
77 *t++ = 0;
78 if (s) return 0;
79 }
80 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
81 int x[] = {25, 17};
82 const int *foo = &x[0];
83 ++foo;
84 }
85 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
86 typedef const int *iptr;
87 iptr p = 0;
88 ++p;
89 }
90 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
91 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
92 struct s { int j; const int *ap[3]; } bx;
93 struct s *b = &bx; b->j = 5;
94 }
95 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
96 const int foo = 10;
97 if (!foo) return 0;
98 }
99 return !cs[0] && !zero.x;
100#endif
101
102 ;
103 return 0;
104}