Bug Summary

File:src/gnu/usr.bin/texinfo/obj/conftest.c
Warning:line 64, column 6
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/texinfo/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/gnu/usr.bin/texinfo/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
3#define PACKAGE_NAME"GNU Texinfo" "GNU Texinfo"
4#define PACKAGE_TARNAME"texinfo" "texinfo"
5#define PACKAGE_VERSION"4.8" "4.8"
6#define PACKAGE_STRING"GNU Texinfo 4.8" "GNU Texinfo 4.8"
7#define PACKAGE_BUGREPORT"" ""
8#define PACKAGE"texinfo" "texinfo"
9#define VERSION"4.8" "4.8"
10#define STDC_HEADERS1 1
11#define HAVE_SYS_TYPES_H1 1
12#define HAVE_SYS_STAT_H1 1
13#define HAVE_STDLIB_H1 1
14#define HAVE_STRING_H1 1
15#define HAVE_MEMORY_H1 1
16#define HAVE_STRINGS_H1 1
17#define HAVE_INTTYPES_H1 1
18#define HAVE_STDINT_H1 1
19#define HAVE_UNISTD_H1 1
20#define STDC_HEADERS1 1
21#define HAVE_FCNTL_H1 1
22#define HAVE_LIMITS_H1 1
23#define HAVE_PWD_H1 1
24#define HAVE_STRING_H1 1
25#define HAVE_STRINGS_H1 1
26#define HAVE_TERMCAP_H1 1
27#define HAVE_TERMIOS_H1 1
28#define HAVE_UNISTD_H1 1
29#define HAVE_SYS_FCNTL_H1 1
30#define HAVE_SYS_FILE_H1 1
31#define HAVE_SYS_TIME_H1 1
32#define HAVE_SYS_WAIT_H1 1
33#define RETSIGTYPEvoid void
34/* end confdefs.h. */
35
36int
37main ()
38{
39/* FIXME: Include the comments suggested by Paul. */
40#ifndef __cplusplus
41 /* Ultrix mips cc rejects this. */
42 typedef int charset[2];
43 const charset x;
44 /* SunOS 4.1.1 cc rejects this. */
45 char const *const *ccp;
46 char **p;
47 /* NEC SVR4.0.2 mips cc rejects this. */
48 struct point {int x, y;};
49 static struct point const zero = {0,0};
50 /* AIX XL C 1.02.0.0 rejects this.
51 It does not let you subtract one const X* pointer from another in
52 an arm of an if-expression whose if-part is not a constant
53 expression */
54 const char *g = "string";
55 ccp = &g + (g
0.1
'g' is non-null
? g-g : 0);
1
'?' condition is true
56 /* HPUX 7.0 cc rejects these. */
57 ++ccp;
58 p = (char**) ccp;
59 ccp = (char const *const *) p;
60 { /* SCO 3.2v4 cc rejects this. */
61 char *t;
2
't' declared without an initial value
62 char const *s = 0 ? (char *) 0 : (char const *) 0;
3
'?' condition is false
63
64 *t++ = 0;
4
The expression is an uninitialized value. The computed value will also be garbage
65 }
66 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
67 int x[] = {25, 17};
68 const int *foo = &x[0];
69 ++foo;
70 }
71 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
72 typedef const int *iptr;
73 iptr p = 0;
74 ++p;
75 }
76 { /* AIX XL C 1.02.0.0 rejects this saying
77 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
78 struct s { int j; const int *ap[3]; };
79 struct s *b; b->j = 5;
80 }
81 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
82 const int foo = 10;
83 }
84#endif
85
86 ;
87 return 0;
88}