Error: CPPCHECK_WARNING (CWE-398): [#def1] avahi-0.9.rc2/avahi-client/client-test.c:55: style[constParameterCallback]: Parameter 'b' can be declared as pointer to const. However it seems that 'avahi_domain_browser_callback' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). # 53| # 54| static void avahi_domain_browser_callback( # 55|-> AvahiDomainBrowser *b, # 56| AvahiIfIndex interface, # 57| AvahiProtocol protocol, Error: CPPCHECK_WARNING (CWE-398): [#def2] avahi-0.9.rc2/avahi-client/client-test.c:61: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'avahi_domain_browser_callback' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 59| const char *domain, # 60| AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, # 61|-> void *userdata) { # 62| # 63| printf ("DOMAIN-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, domain ? domain : "NULL", (char*)userdata); Error: CPPCHECK_WARNING (CWE-398): [#def3] avahi-0.9.rc2/avahi-client/client-test.c:67: style[constParameterCallback]: Parameter 'r' can be declared as pointer to const. However it seems that 'avahi_service_resolver_callback' is a callback function, if 'r' is declared with const you might also need to cast function pointer(s). # 65| # 66| static void avahi_service_resolver_callback( # 67|-> AvahiServiceResolver *r, # 68| AvahiIfIndex interface, # 69| AvahiProtocol protocol, Error: CPPCHECK_WARNING (CWE-398): [#def4] avahi-0.9.rc2/avahi-client/client-test.c:79: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'avahi_service_resolver_callback' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 77| AvahiStringList *txt, # 78| AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, # 79|-> void *userdata) { # 80| # 81| char addr[64]; Error: CPPCHECK_WARNING (CWE-398): [#def5] avahi-0.9.rc2/avahi-client/client-test.c:102: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'avahi_service_browser_callback' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 100| const char *domain, # 101| AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, # 102|-> void *userdata) { # 103| # 104| AvahiServiceResolver *sr; Error: CPPCHECK_WARNING (CWE-398): [#def6] avahi-0.9.rc2/avahi-client/client-test.c:116: style[constParameterCallback]: Parameter 'b' can be declared as pointer to const. However it seems that 'avahi_service_type_browser_callback' is a callback function, if 'b' is declared with const you might also need to cast function pointer(s). # 114| # 115| static void avahi_service_type_browser_callback ( # 116|-> AvahiServiceTypeBrowser *b, # 117| AvahiIfIndex interface, # 118| AvahiProtocol protocol, Error: CPPCHECK_WARNING (CWE-398): [#def7] avahi-0.9.rc2/avahi-client/client-test.c:123: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'avahi_service_type_browser_callback' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 121| const char *domain, # 122| AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, # 123|-> void *userdata) { # 124| # 125| printf ("SERVICE-TYPE-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), type (%s), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, type ? type : "NULL", domain ? domain : "NULL", (char*)userdata); Error: CPPCHECK_WARNING (CWE-398): [#def8] avahi-0.9.rc2/avahi-client/client-test.c:136: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'avahi_address_resolver_callback' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 134| const char *name, # 135| AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, # 136|-> void *userdata) { # 137| # 138| char addr[64]; Error: CPPCHECK_WARNING (CWE-398): [#def9] avahi-0.9.rc2/avahi-client/client-test.c:155: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'avahi_host_name_resolver_callback' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 153| const AvahiAddress *a, # 154| AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, # 155|-> void *userdata) { # 156| # 157| AvahiClient *client; Error: CPPCHECK_WARNING (CWE-475): [#def10] avahi-0.9.rc2/avahi-client/client-test.c:197: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 195| avahi_entry_group_reset (g); # 196| # 197|-> avahi_entry_group_add_service (g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar2", NULL); # 198| # 199| avahi_entry_group_commit (g); Error: CPPCHECK_WARNING (CWE-475): [#def11] avahi-0.9.rc2/avahi-client/client-test.c:207: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 205| printf ("Updating entry group\n"); # 206| # 207|-> avahi_entry_group_update_service_txt(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, "foo=bar3", NULL); # 208| } # 209| Error: CPPCHECK_WARNING (CWE-475): [#def12] avahi-0.9.rc2/avahi-client/client-test.c:264: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 262| printf("Successfully created entry group %p\n", (void*) group); # 263| # 264|-> printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL))); # 265| printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6)); # 266| Error: CPPCHECK_WARNING (CWE-476): [#def13] avahi-0.9.rc2/avahi-client/client.c:144: warning[nullPointerRedundantCheck]: Either the condition '!old' is redundant or there is possible null pointer dereference: old. # 142| if (strcmp(name, AVAHI_DBUS_NAME) == 0) { # 143| # 144|-> if (old[0] && # 145| avahi_client_is_connected(client)) { # 146| Error: COMPILER_WARNING (CWE-843): [#def14] avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'client_callback' avahi-0.9.rc2/avahi-compat-howl/compat.c:325:18: warning[-Wcast-function-type]: cast between incompatible function types from 'sw_result (*)(void)' {aka 'int (*)(void)'} to 'sw_result (*)(struct _sw_discovery *, sw_discovery_oid, sw_discovery_browse_status, sw_uint32, const char *, const char *, const char *, void *)' {aka 'int (*)(struct _sw_discovery *, unsigned int, enum _sw_discovery_browse_status, unsigned int, const char *, const char *, const char *, void *)'} # 325 | ((sw_discovery_browse_reply) self->oid_table[oid].reply)(self, oid, SW_DISCOVERY_BROWSE_INVALID, 0, NULL, NULL, NULL, self->oid_table[oid].extra); # | ^ # 323| case OID_DOMAIN_BROWSER: # 324| case OID_SERVICE_BROWSER: # 325|-> ((sw_discovery_browse_reply) self->oid_table[oid].reply)(self, oid, SW_DISCOVERY_BROWSE_INVALID, 0, NULL, NULL, NULL, self->oid_table[oid].extra); # 326| break; # 327| Error: CPPCHECK_WARNING (CWE-398): [#def15] avahi-0.9.rc2/avahi-compat-howl/compat.c:762: style[constParameterPointer]: Parameter 'text_record' can be declared as pointer to const # 760| sw_const_string host, # 761| sw_port port, # 762|-> sw_octets text_record, # 763| sw_uint32 text_record_len, # 764| sw_discovery_publish_reply reply, Error: COMPILER_WARNING: [#def16] avahi-0.9.rc2/avahi-compat-howl/include/salt/salt.h:32: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/howl.h:32: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/unsupported.c:26: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/salt/platform.h:411:1: warning[-Wstrict-prototypes]: function declaration isn't a prototype # 411 | sw_strerror(); # | ^~~~~~~~~~~ # 409| # 410| sw_const_string # 411|-> sw_strerror(); # 412| # 413| Error: COMPILER_WARNING: [#def17] avahi-0.9.rc2/avahi-compat-howl/include/salt/salt.h:32: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/howl.h:32: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/address.c:34: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/salt/platform.h:411:1: warning[-Wstrict-prototypes]: function declaration isn’t a prototype # 411 | sw_strerror(); # | ^~~~~~~~~~~ # 409| # 410| sw_const_string # 411|-> sw_strerror(); # 412| # 413| Error: COMPILER_WARNING (CWE-563): [#def18] avahi-0.9.rc2/avahi-compat-howl/samples/browse.c:46:73: warning[-Wunused-parameter]: unused parameter ‘extra’ # 46 | sw_opaque_t extra) # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ # 44| sw_octets text_record, # 45| sw_uint32 text_record_len, # 46|-> sw_opaque_t extra) # 47| { # 48| sw_text_record_iterator it; Error: COMPILER_WARNING (CWE-681): [#def19] avahi-0.9.rc2/avahi-compat-howl/samples/browse.c: scope_hint: In function ‘my_resolver’ avahi-0.9.rc2/avahi-compat-howl/samples/browse.c:58:132: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘sw_ipv4_address_name’ differ in signedness # 58 | fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port); # | ^~~~~~~~ # | | # | sw_int8 * {aka signed char *} avahi-0.9.rc2/avahi-compat-howl/include/corby/orb.h:33: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/howl.h:35: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/salt/address.h:104:65: note: expected ‘sw_string’ {aka ‘char *’} but argument is of type ‘sw_int8 *’ {aka ‘signed char *’} # 104 | sw_string name, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ # 56| sw_discovery_cancel(discovery, oid); # 57| # 58|-> fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port); # 59| # 60| if ((text_record_len > 0) && (text_record) && (*text_record != '\0')) Error: COMPILER_WARNING (CWE-681): [#def20] avahi-0.9.rc2/avahi-compat-howl/samples/browse.c:65:57: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘sw_text_record_iterator_next’ differ in signedness # 65 | while (sw_text_record_iterator_next(it, key, oval, &oval_len) == SW_OKAY) # | ^~~ # | | # | sw_int8 * {aka signed char *} avahi-0.9.rc2/avahi-compat-howl/include/howl.h:41: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/discovery/text_record.h:112:97: note: expected ‘char *’ but argument is of type ‘sw_int8 *’ {aka ‘signed char *’} # 112 | char key[SW_TEXT_RECORD_MAX_LEN], # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ # 63| sw_check_okay(err, exit); # 64| # 65|-> while (sw_text_record_iterator_next(it, key, oval, &oval_len) == SW_OKAY) # 66| { # 67| fprintf(stderr, "Txt: [%s]=[%s] - (%d bytes)\n", key, oval, oval_len); Error: COMPILER_WARNING (CWE-563): [#def21] avahi-0.9.rc2/avahi-compat-howl/samples/browse.c: scope_hint: In function ‘my_browser’ avahi-0.9.rc2/avahi-compat-howl/samples/browse.c:83:89: warning[-Wunused-parameter]: unused parameter ‘oid’ # 83 | sw_discovery_oid oid, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ # 81| my_browser( # 82| sw_discovery discovery, # 83|-> sw_discovery_oid oid, # 84| sw_discovery_browse_status status, # 85| sw_uint32 interface_index, Error: COMPILER_WARNING (CWE-563): [#def22] avahi-0.9.rc2/avahi-compat-howl/samples/browse.c:89:97: warning[-Wunused-parameter]: unused parameter ‘extra’ # 89 | sw_opaque_t extra) # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ # 87| sw_const_string type, # 88| sw_const_string domain, # 89|-> sw_opaque_t extra) # 90| { # 91| sw_discovery_resolve_id rid; Error: COMPILER_WARNING (CWE-563): [#def23] avahi-0.9.rc2/avahi-compat-howl/samples/publish.c:35:89: warning[-Wunused-parameter]: unused parameter ‘discovery’ # 35 | sw_discovery discovery, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ # 33| static sw_result HOWL_API # 34| my_service_reply( # 35|-> sw_discovery discovery, # 36| sw_discovery_oid oid, # 37| sw_discovery_publish_status status, Error: COMPILER_WARNING (CWE-563): [#def24] avahi-0.9.rc2/avahi-compat-howl/samples/publish.c:36:89: warning[-Wunused-parameter]: unused parameter ‘oid’ # 36 | sw_discovery_oid oid, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ # 34| my_service_reply( # 35| sw_discovery discovery, # 36|-> sw_discovery_oid oid, # 37| sw_discovery_publish_status status, # 38| sw_opaque extra) Error: COMPILER_WARNING (CWE-563): [#def25] avahi-0.9.rc2/avahi-compat-howl/samples/publish.c:38:97: warning[-Wunused-parameter]: unused parameter ‘extra’ # 38 | sw_opaque extra) # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ # 36| sw_discovery_oid oid, # 37| sw_discovery_publish_status status, # 38|-> sw_opaque extra) # 39| { # 40| static sw_string Error: COMPILER_WARNING (CWE-704): [#def26] avahi-0.9.rc2/avahi-compat-howl/samples/publish.c: scope_hint: In function ‘my_service_reply’ avahi-0.9.rc2/avahi-compat-howl/samples/publish.c:43:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type # 43 | "Started", # | ^~~~~~~~~ # 41| status_text[] = # 42| { # 43|-> "Started", # 44| "Stopped", # 45| "Name Collision", Error: COMPILER_WARNING (CWE-704): [#def27] avahi-0.9.rc2/avahi-compat-howl/samples/publish.c:44:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type # 44 | "Stopped", # | ^~~~~~~~~ # 42| { # 43| "Started", # 44|-> "Stopped", # 45| "Name Collision", # 46| "Invalid" Error: COMPILER_WARNING (CWE-704): [#def28] avahi-0.9.rc2/avahi-compat-howl/samples/publish.c:45:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type # 45 | "Name Collision", # | ^~~~~~~~~~~~~~~~ # 43| "Started", # 44| "Stopped", # 45|-> "Name Collision", # 46| "Invalid" # 47| }; Error: COMPILER_WARNING (CWE-704): [#def29] avahi-0.9.rc2/avahi-compat-howl/samples/publish.c:46:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type # 46 | "Invalid" # | ^~~~~~~~~ # 44| "Stopped", # 45| "Name Collision", # 46|-> "Invalid" # 47| }; # 48| Error: COMPILER_WARNING (CWE-563): [#def30] avahi-0.9.rc2/avahi-compat-howl/samples/query.c:36:105: warning[-Wunused-parameter]: unused parameter ‘session’ # 36 | sw_discovery session, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ # 34| static sw_result HOWL_API # 35| query_record_reply( # 36|-> sw_discovery session, # 37| sw_discovery_oid oid, # 38| sw_discovery_query_record_status status, Error: COMPILER_WARNING (CWE-563): [#def31] avahi-0.9.rc2/avahi-compat-howl/samples/query.c:37:105: warning[-Wunused-parameter]: unused parameter ‘oid’ # 37 | sw_discovery_oid oid, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ # 35| query_record_reply( # 36| sw_discovery session, # 37|-> sw_discovery_oid oid, # 38| sw_discovery_query_record_status status, # 39| sw_uint32 interface_index, Error: COMPILER_WARNING (CWE-563): [#def32] avahi-0.9.rc2/avahi-compat-howl/samples/query.c:38:81: warning[-Wunused-parameter]: unused parameter ‘status’ # 38 | sw_discovery_query_record_status status, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ # 36| sw_discovery session, # 37| sw_discovery_oid oid, # 38|-> sw_discovery_query_record_status status, # 39| sw_uint32 interface_index, # 40| sw_const_string fullname, Error: COMPILER_WARNING (CWE-563): [#def33] avahi-0.9.rc2/avahi-compat-howl/samples/query.c:43:113: warning[-Wunused-parameter]: unused parameter ‘rrdatalen’ # 43 | sw_uint16 rrdatalen, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ # 41| sw_uint16 rrtype, # 42| sw_uint16 rrclass, # 43|-> sw_uint16 rrdatalen, # 44| sw_const_octets rrdata, # 45| sw_uint32 ttl, Error: COMPILER_WARNING (CWE-563): [#def34] avahi-0.9.rc2/avahi-compat-howl/samples/query.c:45:113: warning[-Wunused-parameter]: unused parameter ‘ttl’ # 45 | sw_uint32 ttl, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ # 43| sw_uint16 rrdatalen, # 44| sw_const_octets rrdata, # 45|-> sw_uint32 ttl, # 46| sw_opaque extra) # 47| { Error: COMPILER_WARNING (CWE-563): [#def35] avahi-0.9.rc2/avahi-compat-howl/samples/query.c:46:113: warning[-Wunused-parameter]: unused parameter ‘extra’ # 46 | sw_opaque extra) # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ # 44| sw_const_octets rrdata, # 45| sw_uint32 ttl, # 46|-> sw_opaque extra) # 47| { # 48| sw_ipv4_address address; Error: COMPILER_WARNING (CWE-563): [#def36] avahi-0.9.rc2/avahi-compat-howl/samples/resolve.c:46:73: warning[-Wunused-parameter]: unused parameter ‘extra’ # 46 | sw_opaque_t extra) # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ # 44| sw_octets text_record, # 45| sw_uint32 text_record_len, # 46|-> sw_opaque_t extra) # 47| { # 48| sw_text_record_iterator it; Error: COMPILER_WARNING (CWE-681): [#def37] avahi-0.9.rc2/avahi-compat-howl/samples/resolve.c: scope_hint: In function ‘my_resolver’ avahi-0.9.rc2/avahi-compat-howl/samples/resolve.c:58:132: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘sw_ipv4_address_name’ differ in signedness # 58 | fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port); # | ^~~~~~~~ # | | # | sw_int8 * {aka signed char *} avahi-0.9.rc2/avahi-compat-howl/include/corby/orb.h:33: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/howl.h:35: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/salt/address.h:104:65: note: expected ‘sw_string’ {aka ‘char *’} but argument is of type ‘sw_int8 *’ {aka ‘signed char *’} # 104 | sw_string name, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ # 56| sw_discovery_cancel(discovery, oid); # 57| # 58|-> fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port); # 59| # 60| if ((text_record_len > 0) && (text_record) && (*text_record != '\0')) Error: COMPILER_WARNING (CWE-681): [#def38] avahi-0.9.rc2/avahi-compat-howl/samples/resolve.c:65:57: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘sw_text_record_iterator_next’ differ in signedness # 65 | while (sw_text_record_iterator_next(it, key, oval, &oval_len) == SW_OKAY) # | ^~~ # | | # | sw_int8 * {aka signed char *} avahi-0.9.rc2/avahi-compat-howl/include/howl.h:41: included_from: Included from here. avahi-0.9.rc2/avahi-compat-howl/include/discovery/text_record.h:112:97: note: expected ‘char *’ but argument is of type ‘sw_int8 *’ {aka ‘signed char *’} # 112 | char key[SW_TEXT_RECORD_MAX_LEN], # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ # 63| sw_check_okay(err, exit); # 64| # 65|-> while (sw_text_record_iterator_next(it, key, oval, &oval_len) == SW_OKAY) # 66| { # 67| fprintf(stderr, "key = %s, data is %d bytes\n", key, oval_len); Error: CPPCHECK_WARNING (CWE-398): [#def39] avahi-0.9.rc2/avahi-compat-howl/text.c:127: style[constParameterPointer]: Parameter 'val' can be declared as pointer to const # 125| sw_text_record self, # 126| sw_const_string key, # 127|-> sw_octets val, # 128| sw_uint32 len) { # 129| Error: CPPCHECK_WARNING (CWE-398): [#def40] avahi-0.9.rc2/avahi-compat-howl/text.c:192: style[constParameterPointer]: Parameter 'text_record' can be declared as pointer to const # 190| sw_result sw_text_record_iterator_init( # 191| sw_text_record_iterator * self, # 192|-> sw_octets text_record, # 193| sw_uint32 text_record_len) { # 194| Error: COMPILER_WARNING: [#def41] avahi-0.9.rc2/avahi-compat-howl/unsupported.c: scope_hint: In function 'sw_strerror' avahi-0.9.rc2/avahi-compat-howl/unsupported.c:62:17: warning[-Wold-style-definition]: old-style function definition # 60| # 61| AVAHI_GCC_NORETURN # 62|-> sw_const_string sw_strerror(/* howl sucks */) { # 63| AVAHI_WARN_UNSUPPORTED_ABORT; # 64| } Error: COMPILER_WARNING: [#def42] avahi-0.9.rc2/avahi-compat-howl/unsupported.c: scope_hint: At top level avahi-0.9.rc2/avahi-compat-howl/unsupported.c:62:17: warning[-Wstrict-prototypes]: function declaration isn't a prototype # 62 | sw_const_string sw_strerror(/* howl sucks */) { # | ^~~~~~~~~~~ # 60| # 61| AVAHI_GCC_NORETURN # 62|-> sw_const_string sw_strerror(/* howl sucks */) { # 63| AVAHI_WARN_UNSUPPORTED_ABORT; # 64| } Error: COMPILER_WARNING: [#def43] avahi-0.9.rc2/avahi-compat-libdns_sd/unsupported.c:27: included_from: Included from here. avahi-0.9.rc2/avahi-compat-libdns_sd/unsupported.c: scope_hint: In function 'DNSServiceRegisterRecord' avahi-0.9.rc2/avahi-compat-libdns_sd/warn.h:33:82: warning[-Wpedantic]: ISO C does not support '__FUNCTION__' predefined identifier # 33 | #define AVAHI_WARN_UNSUPPORTED do { avahi_warn_linkage(); avahi_warn_unsupported(__FUNCTION__); } while(0) # | ^~~~~~~~~~~~ avahi-0.9.rc2/avahi-compat-libdns_sd/unsupported.c:43:5: note: in expansion of macro 'AVAHI_WARN_UNSUPPORTED' # 43 | AVAHI_WARN_UNSUPPORTED; # | ^~~~~~~~~~~~~~~~~~~~~~ # 31| # 32| #define AVAHI_WARN_LINKAGE do { avahi_warn_linkage(); } while(0) # 33|-> #define AVAHI_WARN_UNSUPPORTED do { avahi_warn_linkage(); avahi_warn_unsupported(__FUNCTION__); } while(0) # 34| #define AVAHI_WARN_UNSUPPORTED_ABORT do { AVAHI_WARN_UNSUPPORTED; abort(); } while(0) # 35| Error: COMPILER_WARNING: [#def44] avahi-0.9.rc2/avahi-compat-libdns_sd/compat.c:47: included_from: Included from here. avahi-0.9.rc2/avahi-compat-libdns_sd/compat.c: scope_hint: In function ‘DNSServiceBrowse’ avahi-0.9.rc2/avahi-compat-libdns_sd/warn.h:33:82: warning[-Wpedantic]: ISO C does not support ‘__FUNCTION__’ predefined identifier # 33 | #define AVAHI_WARN_UNSUPPORTED do { avahi_warn_linkage(); avahi_warn_unsupported(__FUNCTION__); } while(0) # | ^~~~~~~~~~~~ avahi-0.9.rc2/avahi-compat-libdns_sd/compat.c:622:9: note: in expansion of macro ‘AVAHI_WARN_UNSUPPORTED’ # 622 | AVAHI_WARN_UNSUPPORTED; # | ^~~~~~~~~~~~~~~~~~~~~~ # 31| # 32| #define AVAHI_WARN_LINKAGE do { avahi_warn_linkage(); } while(0) # 33|-> #define AVAHI_WARN_UNSUPPORTED do { avahi_warn_linkage(); avahi_warn_unsupported(__FUNCTION__); } while(0) # 34| #define AVAHI_WARN_UNSUPPORTED_ABORT do { AVAHI_WARN_UNSUPPORTED; abort(); } while(0) # 35| Error: CPPCHECK_WARNING (CWE-398): [#def45] avahi-0.9.rc2/avahi-core/avahi-test.c:56: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'dump_line' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 54| } # 55| # 56|-> static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) { # 57| printf("%s\n", text); # 58| } Error: CPPCHECK_WARNING (CWE-398): [#def46] avahi-0.9.rc2/avahi-core/avahi-test.c:95: style[constParameterCallback]: Parameter 'record' can be declared as pointer to const. However it seems that 'record_browser_callback' is a callback function, if 'record' is declared with const you might also need to cast function pointer(s). # 93| AvahiProtocol protocol, # 94| AvahiBrowserEvent event, # 95|-> AvahiRecord *record, # 96| AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, # 97| AVAHI_GCC_UNUSED void* userdata) { Error: CPPCHECK_WARNING (CWE-475): [#def47] avahi-0.9.rc2/avahi-core/avahi-test.c:169: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 167| } # 168| # 169|-> if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, service_name, "_http._tcp", NULL, NULL, 80, "foo", NULL) < 0) { # 170| avahi_log_error("Failed to add HTTP service"); # 171| goto fail; Error: CPPCHECK_WARNING (CWE-475): [#def48] avahi-0.9.rc2/avahi-core/avahi-test.c:174: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 172| } # 173| # 174|-> if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, service_name, "_ftp._tcp", NULL, NULL, 21, "foo", NULL) < 0) { # 175| avahi_log_error("Failed to add FTP service"); # 176| goto fail; Error: CPPCHECK_WARNING (CWE-475): [#def49] avahi-0.9.rc2/avahi-core/avahi-test.c:179: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 177| } # 178| # 179|-> if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0,service_name, "_webdav._tcp", NULL, NULL, 80, "foo", NULL) < 0) { # 180| avahi_log_error("Failed to add WEBDAV service"); # 181| goto fail; Error: CPPCHECK_WARNING (CWE-398): [#def50] avahi-0.9.rc2/avahi-core/browse.c:163: style[constParameterPointer]: Parameter 'key' can be declared as pointer to const # 161| AvahiProtocol protocol, # 162| AvahiLookupFlags flags, # 163|-> AvahiKey *key) { # 164| # 165| AvahiSRBLookup *l; Error: CPPCHECK_WARNING (CWE-398): [#def51] avahi-0.9.rc2/avahi-core/conformance-test.c:50: style[constParameterCallback]: Parameter 'userdata' can be declared as pointer to const. However it seems that 'dump_line' is a callback function, if 'userdata' is declared with const you might also need to cast function pointer(s). # 48| static const AvahiPoll *poll_api; # 49| # 50|-> static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) { # 51| printf("%s\n", text); # 52| } Error: CPPCHECK_WARNING (CWE-475): [#def52] avahi-0.9.rc2/avahi-core/conformance-test.c:79: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 77| group = avahi_s_entry_group_new(avahi, entry_group_callback, NULL); # 78| # 79|-> avahi_server_add_service(avahi, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_http._tcp", NULL, NULL, 80, "foo", NULL); # 80| avahi_s_entry_group_commit(group); # 81| Error: CPPCHECK_WARNING (CWE-398): [#def53] avahi-0.9.rc2/avahi-core/entry.c:798: style[constParameterPointer]: Parameter 'strlst' can be declared as pointer to const # 796| const char *type, # 797| const char *domain, # 798|-> AvahiStringList *strlst) { # 799| # 800| return server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_copy(strlst)); Error: CPPCHECK_WARNING (CWE-475): [#def54] avahi-0.9.rc2/avahi-core/iface.c:145: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 143| snprintf(name, sizeof(name), "%s [%s]", unescaped, mac); # 144| # 145|-> if (avahi_server_add_service(m->server, hw->entry_group, hw->index, AVAHI_PROTO_UNSPEC, 0, name, "_workstation._tcp", NULL, NULL, 9, NULL) < 0) { # 146| avahi_log_warn(__FILE__": avahi_server_add_service() failed: %s", avahi_strerror(m->server->error)); # 147| avahi_s_entry_group_free(hw->entry_group); Error: CPPCHECK_WARNING (CWE-475): [#def55] avahi-0.9.rc2/avahi-core/update-test.c:51: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 49| assert(group); # 50| # 51|-> ret = avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "foo", "_http._tcp", NULL, NULL, 80, "test1", NULL); # 52| assert(ret == AVAHI_OK); # 53| Error: CPPCHECK_WARNING (CWE-475): [#def56] avahi-0.9.rc2/avahi-core/update-test.c:64: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 62| avahi_log_debug("modifying"); # 63| # 64|-> ret = avahi_server_update_service_txt(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "foo", "_http._tcp", NULL, "test2", NULL); # 65| assert(ret == AVAHI_OK); # 66| } Error: CPPCHECK_WARNING (CWE-398): [#def57] avahi-0.9.rc2/avahi-discover-standalone/main.c:268: style[constParameterCallback]: Parameter 'r' can be declared as pointer to const. However it seems that 'service_resolver_callback' is a callback function, if 'r' is declared with const you might also need to cast function pointer(s). # 266| # 267| static void service_resolver_callback( # 268|-> AvahiSServiceResolver *r, # 269| AVAHI_GCC_UNUSED AvahiIfIndex interface, # 270| AVAHI_GCC_UNUSED AvahiProtocol protocol, Error: CPPCHECK_WARNING (CWE-398): [#def58] avahi-0.9.rc2/avahi-discover-standalone/main.c:314: style[constParameterCallback]: Parameter 'event' can be declared as pointer to const. However it seems that 'main_window_on_delete_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). # 312| } # 313| # 314|-> static gboolean main_window_on_delete_event(AVAHI_GCC_UNUSED GtkWidget *widget, AVAHI_GCC_UNUSED GdkEvent *event, AVAHI_GCC_UNUSED gpointer user_data) { # 315| gtk_main_quit(); # 316| return FALSE; Error: CPPCHECK_WARNING (CWE-398): [#def59] avahi-0.9.rc2/avahi-discover-standalone/main.c:314: style[constParameterCallback]: Parameter 'widget' can be declared as pointer to const. However it seems that 'main_window_on_delete_event' is a callback function, if 'widget' is declared with const you might also need to cast function pointer(s). # 312| } # 313| # 314|-> static gboolean main_window_on_delete_event(AVAHI_GCC_UNUSED GtkWidget *widget, AVAHI_GCC_UNUSED GdkEvent *event, AVAHI_GCC_UNUSED gpointer user_data) { # 315| gtk_main_quit(); # 316| return FALSE; Error: CPPCHECK_WARNING (CWE-783): [#def60] avahi-0.9.rc2/avahi-glib/glib-watch.c:95: style[clarifyCalculation]: Clarify calculation precedence for '&' and '?'. # 93| static gushort map_events_to_glib(AvahiWatchEvent events) { # 94| return # 95|-> (events & AVAHI_WATCH_IN ? G_IO_IN : 0) | # 96| (events & AVAHI_WATCH_OUT ? G_IO_OUT : 0) | # 97| (events & AVAHI_WATCH_ERR ? G_IO_ERR : 0) | Error: CPPCHECK_WARNING (CWE-783): [#def61] avahi-0.9.rc2/avahi-glib/glib-watch.c:96: style[clarifyCalculation]: Clarify calculation precedence for '&' and '?'. # 94| return # 95| (events & AVAHI_WATCH_IN ? G_IO_IN : 0) | # 96|-> (events & AVAHI_WATCH_OUT ? G_IO_OUT : 0) | # 97| (events & AVAHI_WATCH_ERR ? G_IO_ERR : 0) | # 98| (events & AVAHI_WATCH_HUP ? G_IO_HUP : 0); Error: CPPCHECK_WARNING (CWE-783): [#def62] avahi-0.9.rc2/avahi-glib/glib-watch.c:97: style[clarifyCalculation]: Clarify calculation precedence for '&' and '?'. # 95| (events & AVAHI_WATCH_IN ? G_IO_IN : 0) | # 96| (events & AVAHI_WATCH_OUT ? G_IO_OUT : 0) | # 97|-> (events & AVAHI_WATCH_ERR ? G_IO_ERR : 0) | # 98| (events & AVAHI_WATCH_HUP ? G_IO_HUP : 0); # 99| } Error: CPPCHECK_WARNING (CWE-783): [#def63] avahi-0.9.rc2/avahi-glib/glib-watch.c:98: style[clarifyCalculation]: Clarify calculation precedence for '&' and '?'. # 96| (events & AVAHI_WATCH_OUT ? G_IO_OUT : 0) | # 97| (events & AVAHI_WATCH_ERR ? G_IO_ERR : 0) | # 98|-> (events & AVAHI_WATCH_HUP ? G_IO_HUP : 0); # 99| } # 100| Error: COMPILER_WARNING (CWE-192): [#def64] avahi-0.9.rc2/avahi-gobject/ga-client.c:248:36: warning[-Wenum-conversion]: implicit conversion from 'GaClientFlags' to 'AvahiClientFlags' # 248 | priv->flags, # | ~~~~^~~~~~~ # 246| # 247| aclient = avahi_client_new(avahi_glib_poll_get(priv->poll), # 248|-> priv->flags, # 249| _avahi_client_cb, client, &aerror); # 250| if (aclient == NULL) { Error: COMPILER_WARNING (CWE-477): [#def65] avahi-0.9.rc2/avahi-gobject/ga-entry-group.c: scope_hint: In function 'ga_entry_group_class_init' avahi-0.9.rc2/avahi-gobject/ga-entry-group.c:115:5: warning[-Wdeprecated-declarations]: 'g_type_class_add_private' is deprecated # 115 | g_type_class_add_private(ga_entry_group_class, # | ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here. /usr/include/glib-2.0/gobject/gtype.h:1503:10: note: declared here # 1503 | void g_type_class_add_private (gpointer g_class, # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 113| GParamSpec *param_spec; # 114| # 115|-> g_type_class_add_private(ga_entry_group_class, # 116| sizeof (GaEntryGroupPrivate)); # 117| Error: COMPILER_WARNING (CWE-477): [#def66] avahi-0.9.rc2/avahi-gobject/ga-record-browser.c: scope_hint: In function 'ga_record_browser_class_init' avahi-0.9.rc2/avahi-gobject/ga-record-browser.c:150:5: warning[-Wdeprecated-declarations]: 'g_type_class_add_private' is deprecated /usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here. /usr/include/glib-2.0/gobject/gtype.h:1503:10: note: declared here # 148| GParamSpec *param_spec; # 149| # 150|-> g_type_class_add_private(ga_record_browser_class, # 151| sizeof (GaRecordBrowserPrivate)); # 152| Error: COMPILER_WARNING (CWE-477): [#def67] avahi-0.9.rc2/avahi-gobject/ga-service-browser.c: scope_hint: In function 'ga_service_browser_class_init' avahi-0.9.rc2/avahi-gobject/ga-service-browser.c:152:5: warning[-Wdeprecated-declarations]: 'g_type_class_add_private' is deprecated /usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here. /usr/include/glib-2.0/gobject/gtype.h:1503:10: note: declared here # 150| GParamSpec *param_spec; # 151| # 152|-> g_type_class_add_private(ga_service_browser_class, # 153| sizeof (GaServiceBrowserPrivate)); # 154| Error: CPPCHECK_WARNING (CWE-398): [#def68] avahi-0.9.rc2/avahi-gobject/ga-service-resolver.c:134: style[constVariablePointer]: Variable 'priv' can be declared as pointer to const # 132| GValue * value, GParamSpec * pspec) { # 133| GaServiceResolver *resolver = GA_SERVICE_RESOLVER(object); # 134|-> GaServiceResolverPrivate *priv = # 135| GA_SERVICE_RESOLVER_GET_PRIVATE(resolver); # 136| Error: COMPILER_WARNING (CWE-477): [#def69] avahi-0.9.rc2/avahi-gobject/ga-service-resolver.c: scope_hint: In function 'ga_service_resolver_class_init' avahi-0.9.rc2/avahi-gobject/ga-service-resolver.c:171:5: warning[-Wdeprecated-declarations]: 'g_type_class_add_private' is deprecated /usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here. /usr/include/glib-2.0/gobject/gtype.h:1503:10: note: declared here # 169| GParamSpec *param_spec; # 170| # 171|-> g_type_class_add_private(ga_service_resolver_class, # 172| sizeof (GaServiceResolverPrivate)); # 173| Error: CPPCHECK_WARNING (CWE-398): [#def70] avahi-0.9.rc2/avahi-gobject/ga-service-resolver.c:393: style[constVariablePointer]: Variable 'priv' can be declared as pointer to const # 391| gboolean ga_service_resolver_get_address(GaServiceResolver * resolver, # 392| AvahiAddress * address, uint16_t * port) { # 393|-> GaServiceResolverPrivate *priv = # 394| GA_SERVICE_RESOLVER_GET_PRIVATE(resolver); # 395| if (priv->port == 0) { Error: CPPCHECK_WARNING (CWE-398): [#def71] avahi-0.9.rc2/avahi-ui/avahi-ui.c:346: style[constParameterCallback]: Parameter 'txt' can be declared as pointer to const. However it seems that 'resolve_callback' is a callback function, if 'txt' is declared with const you might also need to cast function pointer(s). # 344| const AvahiAddress *a, # 345| uint16_t port, # 346|-> AvahiStringList *txt, # 347| AvahiLookupResultFlags flags G_GNUC_UNUSED, # 348| void *userdata) { Error: CPPCHECK_WARNING (CWE-398): [#def72] avahi-0.9.rc2/avahi-utils/avahi-browse.c:154: style[constParameterPointer]: Parameter 'config' can be declared as pointer to const # 152| } # 153| # 154|-> static void print_service_line(Config *config, char c, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain, int nl) { # 155| char ifname[IF_NAMESIZE]; # 156| Error: CPPCHECK_WARNING (CWE-563): [#def73] avahi-0.9.rc2/avahi-utils/avahi-browse.c:509: style[unreadVariable]: Variable 'b' is assigned a value that is never used. # 507| assert(c); # 508| # 509|-> if (!(b = avahi_domain_browser_new( # 510| client, # 511| AVAHI_IF_UNSPEC, Error: COMPILER_WARNING (CWE-252): [#def74] avahi-0.9.rc2/avahi-utils/sigint.c: scope_hint: In function ‘handler’ avahi-0.9.rc2/avahi-utils/sigint.c:55:5: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 55 | write(pipe_fds[1], &s, sizeof(s)); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 53| # 54| static void handler(int s) { # 55|-> write(pipe_fds[1], &s, sizeof(s)); # 56| } # 57| Error: CPPCHECK_WARNING (CWE-475): [#def75] avahi-0.9.rc2/examples/client-publish-service.c:115: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 113| # 114| /* Add the service for IPP */ # 115|-> if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_ipp._tcp", NULL, NULL, 651, "test=blah", r, NULL)) < 0) { # 116| # 117| if (ret == AVAHI_ERR_COLLISION) Error: CPPCHECK_WARNING (CWE-475): [#def76] avahi-0.9.rc2/examples/client-publish-service.c:125: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 123| # 124| /* Add the same service for BSD LPR */ # 125|-> if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_printer._tcp", NULL, NULL, 515, NULL)) < 0) { # 126| # 127| if (ret == AVAHI_ERR_COLLISION) Error: CPPCHECK_WARNING (CWE-398): [#def77] avahi-0.9.rc2/examples/core-publish-service.c:42: style[constParameterCallback]: Parameter 'g' can be declared as pointer to const. However it seems that 'entry_group_callback' is a callback function, if 'g' is declared with const you might also need to cast function pointer(s). # 40| static void create_services(AvahiServer *s); # 41| # 42|-> static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) { # 43| assert(s); # 44| assert(g == group); Error: CPPCHECK_WARNING (CWE-475): [#def78] avahi-0.9.rc2/examples/core-publish-service.c:103: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 101| # 102| /* Add the service for IPP */ # 103|-> if ((ret = avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_ipp._tcp", NULL, NULL, 651, "test=blah", r, NULL)) < 0) { # 104| fprintf(stderr, "Failed to add _ipp._tcp service: %s\n", avahi_strerror(ret)); # 105| goto fail; Error: CPPCHECK_WARNING (CWE-475): [#def79] avahi-0.9.rc2/examples/core-publish-service.c:109: portability[varFuncNullUB]: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. # 107| # 108| /* Add the same service for BSD LPR */ # 109|-> if ((ret = avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_printer._tcp", NULL, NULL, 515, NULL)) < 0) { # 110| fprintf(stderr, "Failed to add _printer._tcp service: %s\n", avahi_strerror(ret)); # 111| goto fail;
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 15.2.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.18.3 |
| diffbase-analyzer-version-gcc | 15.2.1 |
| diffbase-analyzer-version-gcc-analyzer | 15.2.1 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-128.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | avahi-0.9.rc2-6.20251229120235676096.pr819.124.gf79b532 |
| diffbase-store-results-to | /tmp/tmpza53k73x/avahi-0.9.rc2-6.20251229120235676096.pr819.124.gf79b532.tar.xz |
| diffbase-time-created | 2025-12-29 12:21:57 |
| diffbase-time-finished | 2025-12-29 12:28:50 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,unicontrol,gcc,shellcheck,clippy' '-o' '/tmp/tmpza53k73x/avahi-0.9.rc2-6.20251229120235676096.pr819.124.gf79b532.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '/tmp/tmpza53k73x/avahi-0.9.rc2-6.20251229120235676096.pr819.124.gf79b532.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-128.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | avahi-0.9.rc2-6.20251229090240048565.master.121.g13b0273 |
| store-results-to | /tmp/tmpsqess4rr/avahi-0.9.rc2-6.20251229090240048565.master.121.g13b0273.tar.xz |
| time-created | 2025-12-29 12:13:12 |
| time-finished | 2025-12-29 12:21:09 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,unicontrol,gcc,shellcheck,clippy' '-o' '/tmp/tmpsqess4rr/avahi-0.9.rc2-6.20251229090240048565.master.121.g13b0273.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '/tmp/tmpsqess4rr/avahi-0.9.rc2-6.20251229090240048565.master.121.g13b0273.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |