Task #95734 - fixed.err
back to task #95734download
Error: GCC_ANALYZER_WARNING (CWE-775):
avahi-0.9.rc2/avahi-compat-howl/address.c: scope_hint: In function 'sw_ipv4_address_init_from_this_host'
avahi-0.9.rc2/avahi-compat-howl/address.c:123:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
avahi-0.9.rc2/avahi-compat-howl/address.c:24: included_from: Included from here.
avahi-0.9.rc2/avahi-compat-howl/address.c:35: included_from: Included from here.
avahi-0.9.rc2/avahi-compat-libdns_sd/warn.h:32:33: note: in expansion of macro 'avahi_warn_linkage'
avahi-0.9.rc2/avahi-compat-howl/address.c:113:5: note: in expansion of macro 'AVAHI_WARN_LINKAGE'
# 121|
# 122| if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0 ||
# 123|-> connect(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0 ||
# 124| getsockname(fd, (struct sockaddr*) &sa, &l) < 0) {
# 125| if (fd >= 0)
Error: GCC_ANALYZER_WARNING (CWE-775):
avahi-0.9.rc2/avahi-compat-howl/address.c: scope_hint: In function ‘sw_ipv4_address_init_from_this_host’
avahi-0.9.rc2/avahi-compat-howl/address.c:123:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
avahi-0.9.rc2/avahi-compat-howl/address.c:24: included_from: Included from here.
avahi-0.9.rc2/avahi-compat-howl/address.c:35: included_from: Included from here.
avahi-0.9.rc2/avahi-compat-libdns_sd/warn.h:32:33: note: in expansion of macro ‘avahi_warn_linkage’
avahi-0.9.rc2/avahi-compat-howl/address.c:113:5: note: in expansion of macro ‘AVAHI_WARN_LINKAGE’
# 121|
# 122| if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0 ||
# 123|-> connect(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0 ||
# 124| getsockname(fd, (struct sockaddr*) &sa, &l) < 0) {
# 125| if (fd >= 0)
Error: COMPILER_WARNING (CWE-843):
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):
avahi-0.9.rc2/avahi-compat-howl/compat.c:590: style[variableScope]: The scope of the variable 'ret' can be reduced.
# 588|
# 589| sw_result sw_salt_run(sw_salt self) {
# 590|-> sw_result ret;
# 591|
# 592| AVAHI_WARN_LINKAGE;
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'reg_report_status'
avahi-0.9.rc2/avahi-compat-howl/compat.c:636:13: 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_publish_status, void *)' {aka 'int (*)(struct _sw_discovery *, unsigned int, enum _sw_discovery_publish_status, void *)'}
# 636 | reply = (sw_discovery_publish_reply) data->reply;
# | ^
# 634| assert(data);
# 635|
# 636|-> reply = (sw_discovery_publish_reply) data->reply;
# 637|
# 638| reply(data->discovery,
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/compat.c:703: style[unreadVariable]: Variable 'ret' is assigned a value that is never used.
# 701|
# 702| /* Register the service */
# 703|-> if ((ret = reg_create_service(data)) < 0) {
# 704| reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
# 705| return;
Error: CLANG_WARNING:
avahi-0.9.rc2/avahi-compat-howl/compat.c:703:18: warning[deadcode.DeadStores]: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret'
# 701|
# 702| /* Register the service */
# 703|-> if ((ret = reg_create_service(data)) < 0) {
# 704| reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
# 705| return;
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'sw_discovery_publish'
avahi-0.9.rc2/avahi-compat-howl/compat.c:798:19: warning[-Wcast-function-type]: cast between incompatible function types from 'sw_discovery_publish_reply' {aka 'int (*)(struct _sw_discovery *, unsigned int, enum _sw_discovery_publish_status, void *)'} to 'sw_result (*)(void)' {aka 'int (*)(void)'}
# 798 | data->reply = (sw_result (*)(void)) reply;
# | ^
# 796| data = oid_get(self, *oid);
# 797| assert(data);
# 798|-> data->reply = (sw_result (*)(void)) reply;
# 799| data->extra = extra;
# 800| data->service_data = sdata;
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/compat.c:828: style[redundantInitialization]: Redundant initialization for 'result'. The initialized value is overwritten before it is read.
# 826| }
# 827|
# 828|-> result = SW_OKAY;
# 829|
# 830| finish:
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'domain_browser_callback'
avahi-0.9.rc2/avahi-compat-howl/compat.c:857:13: 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 *)'}
# 857 | reply = (sw_discovery_browse_reply) data->reply;
# | ^
# 855| assert(data);
# 856|
# 857|-> reply = (sw_discovery_browse_reply) data->reply;
# 858|
# 859| domain = add_trailing_dot(domain, domain_fixed, sizeof(domain_fixed));
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'sw_discovery_browse_domains'
avahi-0.9.rc2/avahi-compat-howl/compat.c:902:19: warning[-Wcast-function-type]: cast between incompatible function types from 'sw_discovery_browse_reply' {aka 'int (*)(struct _sw_discovery *, unsigned int, enum _sw_discovery_browse_status, unsigned int, const char *, const char *, const char *, void *)'} to 'sw_result (*)(void)' {aka 'int (*)(void)'}
# 902 | data->reply = (sw_result (*)(void)) reply;
# | ^
# 900| data = oid_get(self, *oid);
# 901| assert(data);
# 902|-> data->reply = (sw_result (*)(void)) reply;
# 903| data->extra = extra;
# 904|
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/compat.c:914: style[redundantInitialization]: Redundant initialization for 'result'. The initialized value is overwritten before it is read.
# 912| }
# 913|
# 914|-> result = SW_OKAY;
# 915|
# 916| finish:
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'service_resolver_callback'
avahi-0.9.rc2/avahi-compat-howl/compat.c:948:13: 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_uint32, const char *, const char *, const char *, sw_ipv4_address, sw_port, sw_uint8 *, sw_uint32, void *)' {aka 'int (*)(struct _sw_discovery *, unsigned int, unsigned int, const char *, const char *, const char *, struct _sw_ipv4_address, short unsigned int, unsigned char *, unsigned int, void *)'}
# 948 | reply = (sw_discovery_resolve_reply) data->reply;
# | ^
# 946| assert(data);
# 947|
# 948|-> reply = (sw_discovery_resolve_reply) data->reply;
# 949|
# 950| switch (event) {
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/compat.c:960: style[unreadVariable]: Variable 'host_name' is assigned a value that is never used.
# 958| sw_ipv4_address_init_from_saddr(&addr, a->data.ipv4.address);
# 959|
# 960|-> host_name = add_trailing_dot(host_name, host_name_fixed, sizeof(host_name_fixed));
# 961|
# 962| if ((p = avahi_new0(uint8_t, (l = avahi_string_list_serialize(txt, NULL, 0))+1)))
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc2/avahi-compat-howl/compat.c:960: warning[uselessAssignmentPtrArg]: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
# 958| sw_ipv4_address_init_from_saddr(&addr, a->data.ipv4.address);
# 959|
# 960|-> host_name = add_trailing_dot(host_name, host_name_fixed, sizeof(host_name_fixed));
# 961|
# 962| if ((p = avahi_new0(uint8_t, (l = avahi_string_list_serialize(txt, NULL, 0))+1)))
Error: CLANG_WARNING:
avahi-0.9.rc2/avahi-compat-howl/compat.c:960:13: warning[deadcode.DeadStores]: Value stored to 'host_name' is never read
# 958| sw_ipv4_address_init_from_saddr(&addr, a->data.ipv4.address);
# 959|
# 960|-> host_name = add_trailing_dot(host_name, host_name_fixed, sizeof(host_name_fixed));
# 961|
# 962| if ((p = avahi_new0(uint8_t, (l = avahi_string_list_serialize(txt, NULL, 0))+1)))
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'sw_discovery_resolve'
avahi-0.9.rc2/avahi-compat-howl/compat.c:1011:19: warning[-Wcast-function-type]: cast between incompatible function types from 'sw_discovery_resolve_reply' {aka 'int (*)(struct _sw_discovery *, unsigned int, unsigned int, const char *, const char *, const char *, struct _sw_ipv4_address, short unsigned int, unsigned char *, unsigned int, void *)'} to 'sw_result (*)(void)' {aka 'int (*)(void)'}
# 1011 | data->reply = (sw_result (*)(void)) reply;
# | ^
# 1009| data = oid_get(self, *oid);
# 1010| assert(data);
# 1011|-> data->reply = (sw_result (*)(void)) reply;
# 1012| data->extra = extra;
# 1013|
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/compat.c:1023: style[redundantInitialization]: Redundant initialization for 'result'. The initialized value is overwritten before it is read.
# 1021| }
# 1022|
# 1023|-> result = SW_OKAY;
# 1024|
# 1025| finish:
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'service_browser_callback'
avahi-0.9.rc2/avahi-compat-howl/compat.c:1054:13: 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 *)'}
# 1054 | reply = (sw_discovery_browse_reply) data->reply;
# | ^
# 1052| assert(data);
# 1053|
# 1054|-> reply = (sw_discovery_browse_reply) data->reply;
# 1055|
# 1056| type = add_trailing_dot(type, type_fixed, sizeof(type_fixed));
Error: COMPILER_WARNING (CWE-843):
avahi-0.9.rc2/avahi-compat-howl/compat.c: scope_hint: In function 'sw_discovery_browse'
avahi-0.9.rc2/avahi-compat-howl/compat.c:1103:19: warning[-Wcast-function-type]: cast between incompatible function types from 'sw_discovery_browse_reply' {aka 'int (*)(struct _sw_discovery *, unsigned int, enum _sw_discovery_browse_status, unsigned int, const char *, const char *, const char *, void *)'} to 'sw_result (*)(void)' {aka 'int (*)(void)'}
# 1103 | data->reply = (sw_result (*)(void)) reply;
# | ^
# 1101| data = oid_get(self, *oid);
# 1102| assert(data);
# 1103|-> data->reply = (sw_result (*)(void)) reply;
# 1104| data->extra = extra;
# 1105|
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/compat.c:1115: style[redundantInitialization]: Redundant initialization for 'result'. The initialized value is overwritten before it is read.
# 1113| }
# 1114|
# 1115|-> result = SW_OKAY;
# 1116|
# 1117| finish:
Error: COMPILER_WARNING:
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:
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/text-test.c:28: 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):
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: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/samples/browse.c:51: style[unusedVariable]: Unused variable: sval
# 49| sw_int8 name_buf[16];
# 50| sw_int8 key[SW_TEXT_RECORD_MAX_LEN];
# 51|-> sw_int8 sval[SW_TEXT_RECORD_MAX_LEN];
# 52| sw_uint8 oval[SW_TEXT_RECORD_MAX_LEN];
# 53| sw_uint32 oval_len;
Error: COMPILER_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/samples/browse.c:51:81: warning[-Wunused-variable]: unused variable ‘sval’
# 51 | sw_int8 sval[SW_TEXT_RECORD_MAX_LEN];
# | ^~~~
# 49| sw_int8 name_buf[16];
# 50| sw_int8 key[SW_TEXT_RECORD_MAX_LEN];
# 51|-> sw_int8 sval[SW_TEXT_RECORD_MAX_LEN];
# 52| sw_uint8 oval[SW_TEXT_RECORD_MAX_LEN];
# 53| sw_uint32 oval_len;
Error: COMPILER_WARNING (CWE-681):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/samples/query.c:48: style[unusedVariable]: Unused variable: address
# 46| sw_opaque extra)
# 47| {
# 48|-> sw_ipv4_address address;
# 49|
# 50| fprintf(stderr, "interface index = 0x%x, fullname is %s\n", interface_index, fullname);
Error: COMPILER_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/samples/query.c:48:25: warning[-Wunused-variable]: unused variable ‘address’
# 48 | sw_ipv4_address address;
# | ^~~~~~~
# 46| sw_opaque extra)
# 47| {
# 48|-> sw_ipv4_address address;
# 49|
# 50| fprintf(stderr, "interface index = 0x%x, fullname is %s\n", interface_index, fullname);
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc2/avahi-compat-howl/samples/query.c:54: style[shadowVariable]: Local variable 'address' shadows outer variable
# 52| if ((rrtype == 1) && (rrclass == 1))
# 53| {
# 54|-> sw_ipv4_address address;
# 55| sw_char name[16];
# 56|
Error: COMPILER_WARNING (CWE-694):
avahi-0.9.rc2/avahi-compat-howl/samples/query.c: scope_hint: In function ‘query_record_reply’
avahi-0.9.rc2/avahi-compat-howl/samples/query.c:54:33: warning[-Wshadow]: declaration of ‘address’ shadows a previous local
# 54 | sw_ipv4_address address;
# | ^~~~~~~
avahi-0.9.rc2/avahi-compat-howl/samples/query.c:48:25: note: shadowed declaration is here
# 48 | sw_ipv4_address address;
# | ^~~~~~~
# 52| if ((rrtype == 1) && (rrclass == 1))
# 53| {
# 54|-> sw_ipv4_address address;
# 55| sw_char name[16];
# 56|
Error: COMPILER_WARNING (CWE-681):
avahi-0.9.rc2/avahi-compat-howl/samples/query.c:59:82: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘sw_ipv4_address_name’ differ in signedness
# 59 | fprintf(stderr, "address is %s\n", sw_ipv4_address_name(address, name, sizeof(name)));
# | ^~~~
# | |
# | 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,
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
# 57| sw_ipv4_address_init_from_saddr(&address, *(sw_saddr*) rrdata);
# 58|
# 59|-> fprintf(stderr, "address is %s\n", sw_ipv4_address_name(address, name, sizeof(name)));
# 60| }
# 61|
Error: COMPILER_WARNING (CWE-563):
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: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/samples/resolve.c:51: style[unusedVariable]: Unused variable: sval
# 49| sw_int8 name_buf[16];
# 50| sw_int8 key[SW_TEXT_RECORD_MAX_LEN];
# 51|-> sw_int8 sval[SW_TEXT_RECORD_MAX_LEN];
# 52| sw_uint8 oval[SW_TEXT_RECORD_MAX_LEN];
# 53| sw_uint32 oval_len;
Error: COMPILER_WARNING (CWE-563):
avahi-0.9.rc2/avahi-compat-howl/samples/resolve.c:51:81: warning[-Wunused-variable]: unused variable ‘sval’
# 51 | sw_int8 sval[SW_TEXT_RECORD_MAX_LEN];
# | ^~~~
# 49| sw_int8 name_buf[16];
# 50| sw_int8 key[SW_TEXT_RECORD_MAX_LEN];
# 51|-> sw_int8 sval[SW_TEXT_RECORD_MAX_LEN];
# 52| sw_uint8 oval[SW_TEXT_RECORD_MAX_LEN];
# 53| sw_uint32 oval_len;
Error: COMPILER_WARNING (CWE-681):
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):
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: COMPILER_WARNING:
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:
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: CLANG_WARNING:
avahi-0.9.rc2/avahi-compat-libdns_sd/compat.c:269:14: warning[unix.BlockInCriticalSection]: Call to blocking function 'read' inside of critical section
# 267| assert(fd >= 0);
# 268|
# 269|-> if ((r = read(fd, &command, 1)) != 1) {
# 270| fprintf(stderr, __FILE__": read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
# 271| return -1;