Task #103922 - added.err
back to task #103922download
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:209: style[unusedLabel]: Label 'finish' is not used.
# 207| }
# 208|
# 209|-> finish:
# 210| fprintf(stdout, "Test finished: %s\n", (result == 0 ? "OK" : "FAIL"));
# 211|
Error: COMPILER_WARNING (CWE-1164):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c: scope_hint: In function ‘test_print_config’
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:209:1: warning[-Wunused-label]: label ‘finish’ defined but not used
# 209 | finish:
# | ^~~~~~
# 207| }
# 208|
# 209|-> finish:
# 210| fprintf(stdout, "Test finished: %s\n", (result == 0 ? "OK" : "FAIL"));
# 211|
Error: CLANG_WARNING:
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:222:9: warning[deadcode.DeadStores]: Value stored to 'result' is never read
# 220| if (avahi_ini_file_load("/DOES-NOT-EXIST") != NULL) {
# 221| fprintf(stderr, "error: trying to load non-existing file did not return error\n");
# 222|-> result = 1;
# 223| }
# 224|
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:225: style[redundantAssignment]: Variable 'result' is reassigned a value before the old one has been used.
# 223| }
# 224|
# 225|-> result = 0;
# 226|
# 227| finish:
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:227: style[unusedLabel]: Label 'finish' is not used.
# 225| result = 0;
# 226|
# 227|-> finish:
# 228| fprintf(stdout, "Test finished: %s\n", (result == 0 ? "OK" : "FAIL"));
# 229|
Error: COMPILER_WARNING (CWE-1164):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c: scope_hint: In function ‘test_avahi_ini_file_load_non_existing’
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:227:1: warning[-Wunused-label]: label ‘finish’ defined but not used
# 227 | finish:
# | ^~~~~~
# 225| result = 0;
# 226|
# 227|-> finish:
# 228| fprintf(stdout, "Test finished: %s\n", (result == 0 ? "OK" : "FAIL"));
# 229|
Error: CLANG_WARNING:
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:241:9: warning[deadcode.DeadStores]: Value stored to 'result' is never read
# 239| if (avahi_ini_file_parse(&config, "/etc/fstab") == 0) {
# 240| fprintf(stderr, "error: trying to parse wrong file did not return error\n");
# 241|-> result = 1;
# 242| }
# 243|
Error: CPPCHECK_WARNING (CWE-563):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:244: style[redundantAssignment]: Variable 'result' is reassigned a value before the old one has been used.
# 242| }
# 243|
# 244|-> result = 0;
# 245|
# 246| finish:
Error: CPPCHECK_WARNING (CWE-398):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:246: style[unusedLabel]: Label 'finish' is not used.
# 244| result = 0;
# 245|
# 246|-> finish:
# 247| fprintf(stdout, "Test finished: %s\n", (result == 0 ? "OK" : "FAIL"));
# 248|
Error: COMPILER_WARNING (CWE-1164):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c: scope_hint: In function ‘test_avahi_ini_file_parse_malformed’
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:246:1: warning[-Wunused-label]: label ‘finish’ defined but not used
# 246 | finish:
# | ^~~~~~
# 244| result = 0;
# 245|
# 246|-> finish:
# 247| fprintf(stdout, "Test finished: %s\n", (result == 0 ? "OK" : "FAIL"));
# 248|
Error: CLANG_WARNING:
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:257:13: warning[unix.Errno]: An undefined value may be read from 'errno'
# 255| snprintf(test_confd_temp_dir, sizeof(test_confd_temp_dir), "%s", test_confd_temp_dir_templ);
# 256| if (mkdtemp(test_confd_temp_dir) == NULL) {
# 257|-> if (errno == EEXIST)
# 258| fprintf(stderr, "error: dir '%s' already exists\n", test_confd_temp_dir);
# 259| else
Error: CPPCHECK_WARNING (CWE-252):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1013: warning[ignoredReturnValue]: Return value of function isalnum() is not used.
# 1011| if ((config.server_config.host_name != NULL) && strlen(config.server_config.host_name) == 32) {
# 1012| for (int i = 0; i < 32; i++) {
# 1013|-> isalnum(config.server_config.host_name[i]);
# 1014| }
# 1015| fprintf(stdout,
Error: CPPCHECK_WARNING (CWE-686):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1177: warning[invalidPrintfArgType_sint]: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
# 1175| }
# 1176| if (config.server_config.n_cache_entries_max != 4444) {
# 1177|-> fprintf(stderr, "error: [server] cache-entries-max '%i' does not match the expectations\n", config.server_config.n_cache_entries_max);
# 1178| unexpected++;
# 1179| }
Error: CPPCHECK_WARNING (CWE-686):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1186: warning[invalidPrintfArgType_sint]: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
# 1184| }
# 1185| if (config.n_clients_max != 1111) {
# 1186|-> fprintf(stderr, "error: [server] clients-max '%i' does not match the expectations\n", config.n_clients_max);
# 1187| unexpected++;
# 1188| }
Error: CPPCHECK_WARNING (CWE-686):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1190: warning[invalidPrintfArgType_sint]: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
# 1188| }
# 1189| if (config.n_objects_per_client_max != 555) {
# 1190|-> fprintf(stderr, "error: [server] objects-per-client-max '%i' does not match the expectations\n", config.n_objects_per_client_max);
# 1191| unexpected++;
# 1192| }
Error: CPPCHECK_WARNING (CWE-686):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1194: warning[invalidPrintfArgType_sint]: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
# 1192| }
# 1193| if (config.n_entries_per_entry_group_max != 33) {
# 1194|-> fprintf(stderr, "error: [server] entries-per-entry-group-max '%i' does not match the expectations\n", config.n_entries_per_entry_group_max);
# 1195| unexpected++;
# 1196| }
Error: CPPCHECK_WARNING (CWE-686):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1203: warning[invalidPrintfArgType_sint]: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
# 1201| }
# 1202| if (config.server_config.ratelimit_burst != 999) {
# 1203|-> fprintf(stderr, "error: [server] ratelimit-burst '%i' does not match the expectations\n", config.server_config.ratelimit_burst);
# 1204| unexpected++;
# 1205| }
Error: CPPCHECK_WARNING (CWE-476):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1243: warning[nullPointerRedundantCheck]: Either the condition 'config.publish_dns_servers!=NULL' is redundant or there is possible null pointer dereference: config.publish_dns_servers.
# 1241| }
# 1242| if ((config.publish_dns_servers != NULL) ||
# 1243|-> (config.publish_dns_servers[0] != NULL) ||
# 1244| (config.publish_dns_servers[1] != NULL) ||
# 1245| (config.publish_dns_servers[2] == NULL)) {
Error: CLANG_WARNING:
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1243:10: warning[core.NullDereference]: Array access (via field 'publish_dns_servers') results in a null pointer dereference
# 1241| }
# 1242| if ((config.publish_dns_servers != NULL) ||
# 1243|-> (config.publish_dns_servers[0] != NULL) ||
# 1244| (config.publish_dns_servers[1] != NULL) ||
# 1245| (config.publish_dns_servers[2] == NULL)) {
Error: CPPCHECK_WARNING (CWE-476):
avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:1244: warning[nullPointerRedundantCheck]: Either the condition 'config.publish_dns_servers!=NULL' is redundant or there is possible null pointer dereference: config.publish_dns_servers.
# 1242| if ((config.publish_dns_servers != NULL) ||
# 1243| (config.publish_dns_servers[0] != NULL) ||
# 1244|-> (config.publish_dns_servers[1] != NULL) ||
# 1245| (config.publish_dns_servers[2] == NULL)) {
# 1246| if (strcmp("10.9.8.1", config.publish_dns_servers[0]) != 0 ||