Task #1495 - added.err
back to task #1495download
Error: CLANG_WARNING:
libxkbcommon-1.7.0/tools/compile-compose.c:33: included_from: Included from here.
libxkbcommon-1.7.0/src/compose/dump.h:48:16: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *'
# 46| const size_t length = strlen(from);
# 47| /* Longest escape is converting ASCII character to "\xNN" */
# 48|-> char* to = calloc(4 * length + 1, sizeof(to));
# 49| if (!to)
# 50| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
libxkbcommon-1.7.0/tools/compile-compose.c:33: included_from: Included from here.
libxkbcommon-1.7.0/src/compose/dump.h: scope_hint: In function ‘escape_utf8_string_literal’
libxkbcommon-1.7.0/src/compose/dump.h:92:12: warning[-Wanalyzer-malloc-leak]: leak of ‘to’
# 90| }
# 91| to[t++] = '\0';
# 92|-> return realloc(to, t);
# 93| }
# 94|
Error: CLANG_WARNING:
libxkbcommon-1.7.0/test/compose.c:912:34: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
# 910| assert(c <= sizeof(buf) - 1);
# 911| }
# 912|-> assert_printf(buf[c] == '\0', "NULL-terminated string\n");
# 913| assert_printf(strlen(buf) == c, "Contains no NULL char\n");
# 914| assert_printf(is_valid_utf8(buf, c),
Error: CLANG_WARNING:
libxkbcommon-1.7.0/test/compose.c:920:27: warning[unix.Malloc]: Potential memory leak
# 918| if (!escaped)
# 919| break;
# 920|-> assert_printf(is_valid_utf8(escaped, strlen(escaped)),
# 921| "Invalid input UTF-8 string: %s\n", escaped);
# 922| char *string_literal = asprintf_safe("\"%s\"", escaped);
Error: CLANG_WARNING:
libxkbcommon-1.7.0/test/keysym.c:394:5: warning[deadcode.DeadStores]: Value stored to 'iter' is never read
# 392| #endif
# 393| }
# 394|-> iter = xkb_keysym_iterator_unref(iter);
# 395| assert(ks_prev == XKB_KEYSYM_MAX_ASSIGNED);
# 396| assert(count == XKB_KEYSYM_UNICODE_MAX - XKB_KEYSYM_UNICODE_MIN + 1 + count_non_unicode);
Error: CLANG_WARNING:
libxkbcommon-1.7.0/tools/compile-compose.c:74:13: warning[unix.Malloc]: Potential memory leak
# 72| char *escaped = escape_utf8_string_literal(utf8);
# 73| if (!escaped) {
# 74|-> fprintf(stderr, "ERROR: Cannot escape the string: allocation error\n");
# 75| return false;
# 76| } else {
Error: GCC_ANALYZER_WARNING (CWE-476):
libxkbcommon-1.7.0/tools/interactive-wayland.c: scope_hint: In function ‘seat_create’
libxkbcommon-1.7.0/tools/interactive-wayland.c:582:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘seat’
# 580| struct interactive_seat *seat = calloc(1, sizeof(*seat));
# 581|
# 582|-> seat->global_name = name;
# 583| seat->inter = inter;
# 584| seat->wl_seat = wl_registry_bind(registry, name, &wl_seat_interface,
Error: GCC_ANALYZER_WARNING (CWE-457):
libxkbcommon-1.7.0/tools/interactive-wayland.c: scope_hint: In function ‘main’
libxkbcommon-1.7.0/tools/interactive-wayland.c:820:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ret’
# 818| xkb_compose_table_unref(compose_table);
# 819| err_out:
# 820|-> exit(ret >= 0 ? EXIT_SUCCESS : EXIT_FAILURE);
# 821| }
Error: COMPILER_WARNING (CWE-457):
libxkbcommon-1.7.0/tools/interactive-wayland.c: scope_hint: In function ‘main’
libxkbcommon-1.7.0/tools/interactive-wayland.c:820:5: warning[-Wmaybe-uninitialized]: ‘ret’ may be used uninitialized
# 820 | exit(ret >= 0 ? EXIT_SUCCESS : EXIT_FAILURE);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libxkbcommon-1.7.0/tools/interactive-wayland.c:716:9: note: ‘ret’ was declared here
# 716 | int ret;
# | ^~~
# 818| xkb_compose_table_unref(compose_table);
# 819| err_out:
# 820|-> exit(ret >= 0 ? EXIT_SUCCESS : EXIT_FAILURE);
# 821| }
Error: CLANG_WARNING:
libxkbcommon-1.7.0/tools/interactive-wayland.c:820:14: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>=' is a garbage value
# 818| xkb_compose_table_unref(compose_table);
# 819| err_out:
# 820|-> exit(ret >= 0 ? EXIT_SUCCESS : EXIT_FAILURE);
# 821| }
Error: CLANG_WARNING:
libxkbcommon-1.7.0/tools/interactive-x11.c:196:5: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 194| deinit_kbd(struct keyboard *kbd)
# 195| {
# 196|-> xkb_state_unref(kbd->state);
# 197| xkb_compose_state_unref(kbd->compose_state);
# 198| xkb_keymap_unref(kbd->keymap);