"Potential usage of an uninitialized variable" build failure(s)
clang 6.0
int f(int b) {
int n;
if (b)
n = 1;
return n;
}
In some cases,
n can be uninitialized.
gcc -Werror plop.c will accept this code while
clang -Werror plop.c will fail.
Package | Version | Supposed error message | Full log |
Bug report |
minicoredumper | 2.0.0-3 | corestripper.c:3632:13: error: variable 'cfg' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
| Log |
|
u1db | 13.10-6.2 | u1db_query.c:902:9: error: variable 'statement' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
| Log |
|
vzquota | 3.1-3 | quotaon.c:1002:7: error: variable 'ugid' is used uninitialized whenever '||' condition is true [-Werror,-Wsometimes-uninitialized]
| Log |
753065
|
wbar | 2.3.4-7 | ../src/core/SuperBar.cc:138:8: error: variable 'textW' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
| Log |
741741
|
4 errors