Task #141150 - added.err
back to task #141150download
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-client/rr-test.c:91: style[constVariablePointer]: Variable 'r' can be declared as pointer to const
# 89| const AvahiPoll *poll_api;
# 90| AvahiClient *client;
# 91|-> AvahiRecordBrowser *r;
# 92|
# 93| simple_poll = avahi_simple_poll_new();
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-client/srv-test.c:56: style[constVariablePointer]: Variable 'r' can be declared as pointer to const
# 54| const AvahiPoll *poll_api;
# 55| AvahiClient *client;
# 56|-> AvahiServiceResolver *r;
# 57|
# 58| simple_poll = avahi_simple_poll_new();
Error: CPPCHECK_WARNING (CWE-476):
avahi-0.9.rc5/avahi-common/strlst-test.c:120: warning[nullPointerRedundantCheck]: Either the condition '!v' is redundant or there is possible null pointer dereference: v.
# 118| must(!v);
# 119|
# 120|-> printf("<%s>=<%s>\n", t, v);
# 121| avahi_free(t);
# 122| avahi_free(v);
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/announce.c:349: style[constVariablePointer]: Variable 'a' can be declared as pointer to const
# 347|
# 348| int avahi_entry_first_probe_sent(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) {
# 349|-> AvahiAnnouncer *a;
# 350|
# 351| assert(s);
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/avahi-test.c:92: style[constParameterCallback]: Parameter 'r' can be declared as pointer to const. However it seems that 'record_browser_callback' is a callback function, if 'r' is declared with const you might also need to cast function pointer(s).
# 90|
# 91| static void record_browser_callback(
# 92|-> AvahiSRecordBrowser *r,
# 93| AvahiIfIndex interface,
# 94| AvahiProtocol protocol,
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/cname-test.c:213: style[constParameterPointer]: Parameter 'test_case' can be declared as pointer to const
# 211| avahi_test_case_function = &function;
# 212|
# 213|-> static void avahi_test_initialize(char *test_case) {
# 214| must(test_case);
# 215|
Error: CPPCHECK_WARNING (CWE-475):
avahi-0.9.rc5/avahi-core/conflict-test.c:544: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour.
# 542| avahi_server_config_init(&config);
# 543| config.host_name = avahi_strdup(HOST_NAME);
# 544|-> config.allow_interfaces = avahi_string_list_new(ifname, NULL);
# 545| config.publish_hinfo = publish_hinfo;
# 546| config.publish_workstation = 0;
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/conflict-test.c:656: style[constParameterCallback]: Parameter 'g' can be declared as pointer to const. However it seems that 'group_callback' is a callback function, if 'g' is declared with const you might also need to cast function pointer(s).
# 654| }
# 655|
# 656|-> static void group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
# 657| if (state != AVAHI_ENTRY_GROUP_ESTABLISHED)
# 658| return;
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/conflict-test.c:656: style[constParameterCallback]: Parameter 's' can be declared as pointer to const. However it seems that 'group_callback' is a callback function, if 's' is declared with const you might also need to cast function pointer(s).
# 654| }
# 655|
# 656|-> static void group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
# 657| if (state != AVAHI_ENTRY_GROUP_ESTABLISHED)
# 658| return;
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/conflict-test.c:656: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'group_callback' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s).
# 654| }
# 655|
# 656|-> static void group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
# 657| if (state != AVAHI_ENTRY_GROUP_ESTABLISHED)
# 658| return;
Error: CPPCHECK_WARNING (CWE-570):
avahi-0.9.rc5/avahi-core/conflict-test.c:796: style[knownConditionTrueFalse]: Condition 'enter_private_netns()==0' is always false
# 794| }
# 795|
# 796|-> if (!wanted && enter_private_netns() == 0)
# 797| avahi_log_info("Running in a private network namespace.");
# 798| else if (mdns_port_in_use()) {
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/dns-test.c:47: style[constVariablePointer]: Variable 'resp' can be declared as pointer to const
# 45| size_t l;
# 46| int res;
# 47|-> uint8_t *resp;
# 48|
# 49| p = avahi_dns_packet_new(0);