Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] hiredis-1.2.0-build/hiredis-1.2.0/net.c: scope_hint: In function ‘redisCheckConnectDone’ hiredis-1.2.0-build/hiredis-1.2.0/net.c:309:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*c.fd’ hiredis-1.2.0-build/hiredis-1.2.0/net.c:39: included_from: Included from here. # 307| int redisCheckConnectDone(redisContext *c, int *completed) { # 308| int rc = connect(c->fd, (const struct sockaddr *)c->saddr, c->addrlen); # 309|-> if (rc == 0) { # 310| *completed = 1; # 311| return REDIS_OK; Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] hiredis-1.2.0-build/hiredis-1.2.0/net.c: scope_hint: In function ‘_redisContextConnectTcp’ hiredis-1.2.0-build/hiredis-1.2.0/net.c:494:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor # 492| for (p = servinfo; p != NULL; p = p->ai_next) { # 493| addrretry: # 494|-> if ((s = socket(p->ai_family,p->ai_socktype,p->ai_protocol)) == REDIS_INVALID_FD) # 495| continue; # 496| Error: GCC_ANALYZER_WARNING (CWE-666): [#def3] hiredis-1.2.0-build/hiredis-1.2.0/net.c:543:13: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘s’ in wrong phase # 541| c->addrlen = p->ai_addrlen; # 542| # 543|-> if (connect(s,p->ai_addr,p->ai_addrlen) == -1) { # 544| if (errno == EHOSTUNREACH) { # 545| redisNetClose(c); Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] hiredis-1.2.0-build/hiredis-1.2.0/sds.c:40: included_from: Included from here. hiredis-1.2.0-build/hiredis-1.2.0/sds.h: scope_hint: In function ‘sdslen’ hiredis-1.2.0-build/hiredis-1.2.0/sds.h:94:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’ hiredis-1.2.0-build/hiredis-1.2.0/sds.c:41: included_from: Included from here. hiredis-1.2.0-build/hiredis-1.2.0/sds.c:94:10: note: in expansion of macro ‘s_malloc’ hiredis-1.2.0-build/hiredis-1.2.0/sds.c: scope_hint: In function ‘sdslen’ # 92| # 93| static inline size_t sdslen(const sds s) { # 94|-> unsigned char flags = s[-1]; # 95| switch(flags&SDS_TYPE_MASK) { # 96| case SDS_TYPE_5:
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-222.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | hiredis-1.2.0-4.fc42 |
store-results-to | /tmp/tmp6x5iqufz/hiredis-1.2.0-4.fc42.tar.xz |
time-created | 2024-11-13 00:19:50 |
time-finished | 2024-11-13 00:21:02 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp6x5iqufz/hiredis-1.2.0-4.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp6x5iqufz/hiredis-1.2.0-4.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |