diff options
| author | Lukas Slebodnik <lslebodn@redhat.com> | 2016-11-26 17:07:07 +0100 |
|---|---|---|
| committer | Lukas Slebodnik <lslebodn@redhat.com> | 2016-11-29 09:46:20 +0100 |
| commit | 13b1d270fb72cf2c2e18f0b2a59cb424c51f7675 (patch) | |
| tree | 8cbf4e3e6cb3fa3c6946f3f615a45b34ced88433 /src/python | |
| parent | 167b05b28d6b969230973646bee2f1c1f49205d2 (diff) | |
CONFDB: Supress clang false passitive warnings
The errno is macro expandee into '(*__errno_location ())'.
The reason is that errno is private in glibc and and the
function __errno_location return address of private errno.
sh$ objdump -T /lib64/libc.so.6 | grep errno
00000010 g D .tbss 00000004 GLIBC_PRIVATE errno
000208a0 g DF .text 00000011 GLIBC_2.2.5 __errno_location
001366b0 g DF .text 0000005f GLIBC_2.2.5 clnt_sperrno
00136710 g DF .text 00000074 GLIBC_2.2.5 clnt_perrno
00000064 g D .tbss 00000004 GLIBC_PRIVATE __h_errno
0011aad0 g DF .text 00000011 GLIBC_2.2.5 __h_errno_location
It looks like clang static analyzer assume that value can be
changed due to function call.
errno = 0;
val = strtol(values[0], NULL, 0);
// Taking true branch => assuming "errno != 0"
if (errno) {
ret = errno;
// errno was stored to ret but clang later assumes
// that ret can be 0
goto failed;
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'src/python')
0 files changed, 0 insertions, 0 deletions
