Task #123155 - added.err
back to task #123155download
Error: CPPCHECK_WARNING (CWE-398): avahi-0.9.rc4/avahi-core/dns-test.c:349: style[constVariablePointer]: Variable 'parsed' can be declared as pointer to const # 347| size_t off; # 348| AvahiDnsPacket *p1; # 349|-> AvahiRecord *parsed; # 350| # 351| pkt = avahi_malloc0(total); Error: CPPCHECK_WARNING (CWE-398): avahi-0.9.rc4/avahi-core/dns-test.c:388: style[constVariablePointer]: Variable 'parsed' can be declared as pointer to const # 386| size_t off; # 387| AvahiDnsPacket *p1; # 388|-> AvahiRecord *parsed; # 389| # 390| pkt = avahi_malloc0(total); Error: CPPCHECK_WARNING (CWE-563): avahi-0.9.rc4/avahi-core/dns-test.c:398: style[unreadVariable]: Variable 'off' is assigned a value that is never used. # 396| pkt[off++] = 0; pkt[off++] = 0; pkt[off++] = 0x11; pkt[off++] = 0x94; /* ttl */ # 397| pkt[off++] = 0x00; pkt[off++] = (uint8_t) sizeof(rd); /* rdlength */ # 398|-> memcpy(pkt + off, rd, sizeof(rd)); off += sizeof(rd); # 399| # 400| p1 = avahi_dns_packet_new(0); Error: CLANG_WARNING: avahi-0.9.rc4/avahi-core/dns-test.c:398:44: warning[deadcode.DeadStores]: Value stored to 'off' is never read # 396| pkt[off++] = 0; pkt[off++] = 0; pkt[off++] = 0x11; pkt[off++] = 0x94; /* ttl */ # 397| pkt[off++] = 0x00; pkt[off++] = (uint8_t) sizeof(rd); /* rdlength */ # 398|-> memcpy(pkt + off, rd, sizeof(rd)); off += sizeof(rd); # 399| # 400| p1 = avahi_dns_packet_new(0); Error: GCC_ANALYZER_WARNING (CWE-688): avahi-0.9.rc4/avahi-core/dns.c: scope_hint: In function 'parse_rdata' avahi-0.9.rc4/avahi-core/dns.c:652:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected avahi-0.9.rc4/avahi-common/malloc.h:28: included_from: Included from here. avahi-0.9.rc4/avahi-core/dns.c:34: included_from: Included from here. avahi-0.9.rc4/avahi-core/dns.c:36: included_from: Included from here. avahi-0.9.rc4/avahi-core/dns.c:514:12: note: in expansion of macro 'AVAHI_DNS_PACKET_DATA' avahi-0.9.rc4/avahi-core/dns.c:514:12: note: in expansion of macro 'AVAHI_DNS_PACKET_DATA' avahi-0.9.rc4/avahi-core/dns.c:364:13: note: in expansion of macro 'AVAHI_DNS_PACKET_DATA' avahi-0.9.rc4/avahi-core/dns.c:364:13: note: in expansion of macro 'AVAHI_DNS_PACKET_DATA' avahi-0.9.rc4/avahi-core/dns.c:395:46: note: in expansion of macro 'AVAHI_DNS_PACKET_DATA' avahi-0.9.rc4/avahi-core/dns.c:364:13: note: in expansion of macro 'AVAHI_DNS_PACKET_DATA' avahi-0.9.rc4/avahi-core/dns.c:364:13: note: in expansion of macro 'AVAHI_DNS_PACKET_DATA' avahi-0.9.rc4/avahi-core/dns.c:25: included_from: Included from here. /usr/include/string.h:47:14: note: argument 2 of 'memcpy' must be non-null # 650| memcpy(r->data.generic.data, buf, namelen); # 651| if (bitmap_size > 0) # 652|-> memcpy((uint8_t*) r->data.generic.data + namelen, bitmap, bitmap_size); # 653| # 654| if (avahi_dns_packet_skip(p, bitmap_size) < 0)