Task #141151 - added.err

back to task #141151
download
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:538: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour.
#  536|       avahi_server_config_init(&config);
#  537|       config.host_name = avahi_strdup(HOST_NAME);
#  538|->     config.allow_interfaces = avahi_string_list_new(ifname, NULL);
#  539|       config.publish_hinfo = publish_hinfo;
#  540|       config.publish_workstation = 0;

Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/conflict-test.c:650: 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).
#  648|   }
#  649|   
#  650|-> static void group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
#  651|       if (state != AVAHI_ENTRY_GROUP_ESTABLISHED)
#  652|           return;

Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/conflict-test.c:650: 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).
#  648|   }
#  649|   
#  650|-> static void group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
#  651|       if (state != AVAHI_ENTRY_GROUP_ESTABLISHED)
#  652|           return;

Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc5/avahi-core/conflict-test.c:650: 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).
#  648|   }
#  649|   
#  650|-> static void group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
#  651|       if (state != AVAHI_ENTRY_GROUP_ESTABLISHED)
#  652|           return;

Error: CPPCHECK_WARNING (CWE-570):
avahi-0.9.rc5/avahi-core/conflict-test.c:757: style[knownConditionTrueFalse]: Condition 'enter_private_netns()==0' is always false
#  755|       }
#  756|   
#  757|->     if (!wanted && enter_private_netns() == 0)
#  758|           avahi_log_info("Running in a private network namespace.");
#  759|       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);