Bug Summary

File:src/gnu/usr.bin/binutils/obj/intl/conftest.c
Warning:line 27, column 4
The expression is an uninitialized value. The computed value will also be garbage

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/gnu/usr.bin/binutils/obj/intl -resource-dir /usr/local/lib/clang/13.0.0 -D PIE_DEFAULT=1 -internal-isystem /usr/local/lib/clang/13.0.0/include -internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir=/usr/src/gnu/usr.bin/binutils/obj/intl -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#line 1033 "configure"
2#include "confdefs.h"
3
4int main() {
5
6/* Ultrix mips cc rejects this. */
7typedef int charset[2]; const charset x;
8/* SunOS 4.1.1 cc rejects this. */
9char const *const *ccp;
10char **p;
11/* NEC SVR4.0.2 mips cc rejects this. */
12struct point {int x, y;};
13static struct point const zero = {0,0};
14/* AIX XL C 1.02.0.0 rejects this.
15 It does not let you subtract one const X* pointer from another in an arm
16 of an if-expression whose if-part is not a constant expression */
17const char *g = "string";
18ccp = &g + (g
0.1
'g' is non-null
? g-g : 0);
1
'?' condition is true
19/* HPUX 7.0 cc rejects these. */
20++ccp;
21p = (char**) ccp;
22ccp = (char const *const *) p;
23{ /* SCO 3.2v4 cc rejects this. */
24 char *t;
2
't' declared without an initial value
25 char const *s = 0 ? (char *) 0 : (char const *) 0;
3
'?' condition is false
26
27 *t++ = 0;
4
The expression is an uninitialized value. The computed value will also be garbage
28}
29{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
30 int x[] = {25, 17};
31 const int *foo = &x[0];
32 ++foo;
33}
34{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
35 typedef const int *iptr;
36 iptr p = 0;
37 ++p;
38}
39{ /* AIX XL C 1.02.0.0 rejects this saying
40 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
41 struct s { int j; const int *ap[3]; };
42 struct s *b; b->j = 5;
43}
44{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
45 const int foo = 10;
46}
47
48; return 0; }