libxkbcommon-1.7.0-1.fc41
List of Defects
Error: GCC_ANALYZER_WARNING (CWE-457): [#def1]
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c: scope_hint: In function ‘_xkbcommon_parse’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:605:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:605:25: note: in definition of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
# 603| # if defined __GNUC__ && 1 < __GNUC__
# 604| # define YYCOPY(Dst, Src, Count) \
# 605|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# 606| # else
# 607| # define YYCOPY(Dst, Src, Count) \
Error: GCC_ANALYZER_WARNING (CWE-457): [#def2]
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1825:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1744:16: note: in expansion of macro ‘yylex’
libxkbcommon-1.7.0/redhat-linux-build/compile-keymap.p/parser.c:1765:17: note: in expansion of macro ‘YYTRANSLATE’
# 1823| unconditionally makes the parser a bit smaller, and it avoids a
# 1824| GCC warning that YYVAL may be used uninitialized. */
# 1825|-> yyval = yyvsp[1-yylen];
# 1826|
# 1827|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def3]
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c: scope_hint: In function ‘_xkbcommon_parse’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:605:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:605:25: note: in definition of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
# 603| # if defined __GNUC__ && 1 < __GNUC__
# 604| # define YYCOPY(Dst, Src, Count) \
# 605|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# 606| # else
# 607| # define YYCOPY(Dst, Src, Count) \
Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1825:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1744:16: note: in expansion of macro ‘yylex’
libxkbcommon-1.7.0/redhat-linux-build/interactive-evdev.p/parser.c:1765:17: note: in expansion of macro ‘YYTRANSLATE’
# 1823| unconditionally makes the parser a bit smaller, and it avoids a
# 1824| GCC warning that YYVAL may be used uninitialized. */
# 1825|-> yyval = yyvsp[1-yylen];
# 1826|
# 1827|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c: scope_hint: In function ‘_xkbcommon_parse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:605:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:605:25: note: in definition of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
# 603| # if defined __GNUC__ && 1 < __GNUC__
# 604| # define YYCOPY(Dst, Src, Count) \
# 605|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# 606| # else
# 607| # define YYCOPY(Dst, Src, Count) \
Error: GCC_ANALYZER_WARNING (CWE-457): [#def6]
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1825:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1744:16: note: in expansion of macro ‘yylex’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon-test-internal.a.p/parser.c:1765:17: note: in expansion of macro ‘YYTRANSLATE’
# 1823| unconditionally makes the parser a bit smaller, and it avoids a
# 1824| GCC warning that YYVAL may be used uninitialized. */
# 1825|-> yyval = yyvsp[1-yylen];
# 1826|
# 1827|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def7]
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c: scope_hint: In function ‘_xkbcommon_parse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:605:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:605:25: note: in definition of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:590:9: note: in expansion of macro ‘YYCOPY’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1698:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
# 603| # if defined __GNUC__ && 1 < __GNUC__
# 604| # define YYCOPY(Dst, Src, Count) \
# 605|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# 606| # else
# 607| # define YYCOPY(Dst, Src, Count) \
Error: GCC_ANALYZER_WARNING (CWE-457): [#def8]
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1825:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
libxkbcommon-1.7.0/src/xkbcomp/parser.y:829:19: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1577:1: note: in expansion of macro ‘yyparse’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1744:16: note: in expansion of macro ‘yylex’
libxkbcommon-1.7.0/redhat-linux-build/libxkbcommon.so.0.0.0.p/parser.c:1765:17: note: in expansion of macro ‘YYTRANSLATE’
# 1823| unconditionally makes the parser a bit smaller, and it avoids a
# 1824| GCC warning that YYVAL may be used uninitialized. */
# 1825|-> yyval = yyvsp[1-yylen];
# 1826|
# 1827|
Error: GCC_ANALYZER_WARNING (CWE-688): [#def9]
libxkbcommon-1.7.0/src/atom.c: scope_hint: In function ‘atom_intern’
libxkbcommon-1.7.0/src/atom.c:151:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
# 149| table->index_size *= 2;
# 150| table->index = realloc(table->index, table->index_size * sizeof(*table->index));
# 151|-> memset(table->index, 0, table->index_size * sizeof(*table->index));
# 152| for (size_t j = 1; j < darray_size(table->strings); j++) {
# 153| const char *s = darray_item(table->strings, j);
Error: CLANG_WARNING: [#def10]
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): [#def11]
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: CPPCHECK_WARNING (CWE-909): [#def12]
libxkbcommon-1.7.0/src/compose/table.c:66: error[uninitStructMember]: Uninitialized struct member: dummy.hikid
# 64| dummy.leaf.utf8 = 0;
# 65| dummy.leaf.keysym = XKB_KEY_NoSymbol;
# 66|-> darray_append(table->nodes, dummy);
# 67|
# 68| darray_append(table->utf8, '\0');
Error: CPPCHECK_WARNING (CWE-909): [#def13]
libxkbcommon-1.7.0/src/compose/table.c:66: error[uninitStructMember]: Uninitialized struct member: dummy.lokid
# 64| dummy.leaf.utf8 = 0;
# 65| dummy.leaf.keysym = XKB_KEY_NoSymbol;
# 66|-> darray_append(table->nodes, dummy);
# 67|
# 68| darray_append(table->utf8, '\0');
Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
libxkbcommon-1.7.0/src/utils.h:56: included_from: Included from here.
libxkbcommon-1.7.0/src/keymap.h:88: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/xkbcomp-priv.h:30: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/compat.c:52: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/compat.c: scope_hint: In function ‘AddInterp’
libxkbcommon-1.7.0/src/darray.h:93:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/compat.c: scope_hint: In function ‘AddInterp’
libxkbcommon-1.7.0/src/xkbcomp/compat.c: scope_hint: In function ‘AddInterp’
libxkbcommon-1.7.0/src/xkbcomp/compat.c: scope_hint: In function ‘AddInterp’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:178:5: note: in expansion of macro ‘darray_foreach’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:178:5: note: in expansion of macro ‘darray_foreach’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:178:5: note: in expansion of macro ‘darray_foreach’
libxkbcommon-1.7.0/src/darray.h:172:24: note: in definition of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:168:42: note: in definition of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:168:42: note: in definition of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/compat.c: scope_hint: In function ‘AddInterp’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/compat.c:256:5: note: in expansion of macro ‘darray_append’
# 91| #define darray_append(arr, ...) do { \
# 92| darray_resize(arr, (arr).size + 1); \
# 93|-> (arr).item[(arr).size - 1] = (__VA_ARGS__); \
# 94| } while (0)
# 95|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
libxkbcommon-1.7.0/src/compose/table.c: scope_hint: In function ‘xkb_compose_table_iterator_new’
libxkbcommon-1.7.0/src/darray.h:93:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*iter.cursors.item’
libxkbcommon-1.7.0/src/compose/table.c:293:9: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:172:24: note: in definition of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/compose/table.c:293:9: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/compose/table.c:293:9: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/compose/table.c:293:9: note: in expansion of macro ‘darray_append’
# 91| #define darray_append(arr, ...) do { \
# 92| darray_resize(arr, (arr).size + 1); \
# 93|-> (arr).item[(arr).size - 1] = (__VA_ARGS__); \
# 94| } while (0)
# 95|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
libxkbcommon-1.7.0/src/utils.h:56: included_from: Included from here.
libxkbcommon-1.7.0/src/compose/table.c:26: included_from: Included from here.
libxkbcommon-1.7.0/src/compose/table.c: scope_hint: In function ‘xkb_compose_table_new’
libxkbcommon-1.7.0/src/darray.h:93:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*table.nodes.item’
libxkbcommon-1.7.0/src/compose/table.c:66:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/compose/table.c:66:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/compose/table.c:66:5: note: in expansion of macro ‘darray_append’
# 91| #define darray_append(arr, ...) do { \
# 92| darray_resize(arr, (arr).size + 1); \
# 93|-> (arr).item[(arr).size - 1] = (__VA_ARGS__); \
# 94| } while (0)
# 95|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
libxkbcommon-1.7.0/src/atom.c:81: included_from: Included from here.
libxkbcommon-1.7.0/src/atom.c: scope_hint: In function ‘atom_table_new’
libxkbcommon-1.7.0/src/darray.h:93:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*table.strings.item’
libxkbcommon-1.7.0/src/atom.c:117:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:172:24: note: in definition of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/atom.c:117:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/atom.c:117:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/atom.c:117:5: note: in expansion of macro ‘darray_append’
# 91| #define darray_append(arr, ...) do { \
# 92| darray_resize(arr, (arr).size + 1); \
# 93|-> (arr).item[(arr).size - 1] = (__VA_ARGS__); \
# 94| } while (0)
# 95|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
libxkbcommon-1.7.0/src/darray.h:93:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*table.utf8.item’
libxkbcommon-1.7.0/src/compose/table.c:68:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/compose/table.c:68:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/compose/table.c:68:5: note: in expansion of macro ‘darray_append’
# 91| #define darray_append(arr, ...) do { \
# 92| darray_resize(arr, (arr).size + 1); \
# 93|-> (arr).item[(arr).size - 1] = (__VA_ARGS__); \
# 94| } while (0)
# 95|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
libxkbcommon-1.7.0/src/utils.h:56: included_from: Included from here.
libxkbcommon-1.7.0/src/keymap.h:88: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/xkbcomp-priv.h:30: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/rules.c:52: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/rules.c: scope_hint: In function ‘split_comma_separated_mlvo’
libxkbcommon-1.7.0/src/darray.h:93:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘__builtin_malloc(96)’
libxkbcommon-1.7.0/src/xkbcomp/rules.c:286:9: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/rules.c:286:9: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/rules.c:286:9: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/rules.c:286:9: note: in expansion of macro ‘darray_append’
# 91| #define darray_append(arr, ...) do { \
# 92| darray_resize(arr, (arr).size + 1); \
# 93|-> (arr).item[(arr).size - 1] = (__VA_ARGS__); \
# 94| } while (0)
# 95|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def20]
libxkbcommon-1.7.0/src/darray.h:93:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘new.mods.mask’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/types.c: scope_hint: In function ‘AddPreserve’
libxkbcommon-1.7.0/src/xkbcomp/types.c: scope_hint: In function ‘AddPreserve’
libxkbcommon-1.7.0/src/xkbcomp/types.c: scope_hint: In function ‘AddPreserve’
libxkbcommon-1.7.0/src/xkbcomp/types.c: scope_hint: In function ‘AddPreserve’
libxkbcommon-1.7.0/src/xkbcomp/types.c: scope_hint: In function ‘AddPreserve’
libxkbcommon-1.7.0/src/xkbcomp/types.c:399:5: note: in expansion of macro ‘darray_foreach’
libxkbcommon-1.7.0/src/darray.h:172:24: note: in definition of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:168:42: note: in definition of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:168:42: note: in definition of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/types.c: scope_hint: In function ‘AddPreserve’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/darray.h:174:9: note: in expansion of macro ‘darray_realloc’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:92:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
libxkbcommon-1.7.0/src/xkbcomp/types.c:442:5: note: in expansion of macro ‘darray_append’
# 91| #define darray_append(arr, ...) do { \
# 92| darray_resize(arr, (arr).size + 1); \
# 93|-> (arr).item[(arr).size - 1] = (__VA_ARGS__); \
# 94| } while (0)
# 95|
Error: GCC_ANALYZER_WARNING (CWE-688): [#def21]
libxkbcommon-1.7.0/src/utils.h:56: included_from: Included from here.
libxkbcommon-1.7.0/src/keymap.h:88: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/xkbcomp-priv.h:30: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:29: included_from: Included from here.
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c: scope_hint: In function ‘AddKeyName’
libxkbcommon-1.7.0/src/darray.h:161:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c: scope_hint: In function ‘AddKeyName’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c: scope_hint: In function ‘AddKeyName’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c: scope_hint: In function ‘AddKeyName’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/darray.h:160:9: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/darray.h:160:9: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/keycodes.c:195:9: note: in expansion of macro ‘darray_resize0’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
# 159| if (__newSize > __oldSize) { \
# 160| darray_growalloc(arr, __newSize); \
# 161|-> memset(&(arr).item[__oldSize], 0, \
# 162| (__newSize - __oldSize) * sizeof(*(arr).item)); \
# 163| } \
Error: GCC_ANALYZER_WARNING (CWE-787): [#def22]
libxkbcommon-1.7.0/src/keysym.c: scope_hint: In function ‘UCSConvertCase’
libxkbcommon-1.7.0/src/keysym.c:658:45: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libxkbcommon-1.7.0/src/keysym.c:658:45: note: valid subscripts for ‘LatinExtB_lower_mapping’ are ‘[0]’ to ‘[76]’
# └─────────────────┘
# ^
# 656| }
# 657| else if (code >= 0x0180 && code <= 0x01cc) {
# 658|-> *lower = LatinExtB_lower_mapping[code - 0x0180];
# 659| *upper = LatinExtB_upper_mapping[code - 0x0180];
# 660| }
Error: GCC_ANALYZER_WARNING (CWE-787): [#def23]
libxkbcommon-1.7.0/src/keysym.c:659:45: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libxkbcommon-1.7.0/src/keysym.c:659:45: note: valid subscripts for ‘LatinExtB_upper_mapping’ are ‘[0]’ to ‘[76]’
# └─────────────────┘
# ^
# 657| else if (code >= 0x0180 && code <= 0x01cc) {
# 658| *lower = LatinExtB_lower_mapping[code - 0x0180];
# 659|-> *upper = LatinExtB_upper_mapping[code - 0x0180];
# 660| }
# 661| else if (code == 0x01dd)
Error: GCC_ANALYZER_WARNING (CWE-787): [#def24]
libxkbcommon-1.7.0/src/keysym.c:680:38: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libxkbcommon-1.7.0/src/keysym.c:680:38: note: valid subscripts for ‘IPAExt_upper_mapping’ are ‘[0]’ to ‘[63]’
# └─────────────────┘
# ^
# 678| /* IPA Extensions, U+0250 to U+02AF */
# 679| if (code >= 0x0253 && code <= 0x0292) {
# 680|-> *upper = IPAExt_upper_mapping[code - 0x0253];
# 681| }
# 682|
Error: GCC_ANALYZER_WARNING (CWE-787): [#def25]
libxkbcommon-1.7.0/src/keysym.c:690:37: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libxkbcommon-1.7.0/src/keysym.c:690:37: note: valid subscripts for ‘Greek_lower_mapping’ are ‘[0]’ to ‘[143]’
# └─────────────────┘
# ^
# 688| /* Greek and Coptic, U+0370 to U+03FF */
# 689| if (code >= 0x0370 && code <= 0x03ff) {
# 690|-> *lower = Greek_lower_mapping[code - 0x0370];
# 691| *upper = Greek_upper_mapping[code - 0x0370];
# 692| if (*upper == 0)
Error: GCC_ANALYZER_WARNING (CWE-787): [#def26]
libxkbcommon-1.7.0/src/keysym.c:691:37: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libxkbcommon-1.7.0/src/keysym.c:691:37: note: valid subscripts for ‘Greek_upper_mapping’ are ‘[0]’ to ‘[143]’
# └─────────────────┘
# ^
# 689| if (code >= 0x0370 && code <= 0x03ff) {
# 690| *lower = Greek_lower_mapping[code - 0x0370];
# 691|-> *upper = Greek_upper_mapping[code - 0x0370];
# 692| if (*upper == 0)
# 693| *upper = code;
Error: GCC_ANALYZER_WARNING (CWE-787): [#def27]
libxkbcommon-1.7.0/src/keysym.c:748:40: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libxkbcommon-1.7.0/src/keysym.c:748:40: note: valid subscripts for ‘GreekExt_lower_mapping’ are ‘[0]’ to ‘[255]’
# └─────────────────┘
# ^
# 746| /* Greek Extended, U+1F00 to U+1FFF */
# 747| if (code >= 0x1f00 && code <= 0x1fff) {
# 748|-> *lower = GreekExt_lower_mapping[code - 0x1f00];
# 749| *upper = GreekExt_upper_mapping[code - 0x1f00];
# 750| if (*upper == 0)
Error: GCC_ANALYZER_WARNING (CWE-787): [#def28]
libxkbcommon-1.7.0/src/keysym.c:749:40: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libxkbcommon-1.7.0/src/keysym.c:749:40: note: valid subscripts for ‘GreekExt_upper_mapping’ are ‘[0]’ to ‘[255]’
# └─────────────────┘
# ^
# 747| if (code >= 0x1f00 && code <= 0x1fff) {
# 748| *lower = GreekExt_lower_mapping[code - 0x1f00];
# 749|-> *upper = GreekExt_upper_mapping[code - 0x1f00];
# 750| if (*upper == 0)
# 751| *upper = code;
Error: CPPCHECK_WARNING (CWE-758): [#def29]
libxkbcommon-1.7.0/src/state.c:1038: warning[objectIndex]: The address of local variable 'sym' might be accessed at non-zero index.
# 1036| offset = 0;
# 1037| for (int i = 0; i < nsyms; i++) {
# 1038|-> int ret = xkb_keysym_to_utf8(syms[i], tmp, sizeof(tmp));
# 1039| if (ret <= 0)
# 1040| goto err_bad;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libxkbcommon-1.7.0/src/x11/keymap.c: scope_hint: In function ‘get_type_names’
libxkbcommon-1.7.0/src/x11/keymap.c:85:12: warning[-Wanalyzer-malloc-leak]: leak of ‘*type.level_names’
libxkbcommon-1.7.0/src/x11/keymap.c:892:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:680:5: note: in expansion of macro ‘FAIL_IF_BAD_REPLY’
libxkbcommon-1.7.0/src/x11/keymap.c:430:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:65:11: note: in definition of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:431:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:65:11: note: in definition of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:432:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:437:5: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:511:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:65:11: note: in definition of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:512:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:772:5: note: in expansion of macro ‘FAIL_IF_BAD_REPLY’
libxkbcommon-1.7.0/src/x11/keymap.c:852:5: note: in expansion of macro ‘FAIL_IF_BAD_REPLY’
libxkbcommon-1.7.0/src/x11/keymap.c:793:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:65:11: note: in definition of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:794:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:797:5: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/utils.h:30: included_from: Included from here.
libxkbcommon-1.7.0/src/keymap.h:88: included_from: Included from here.
libxkbcommon-1.7.0/src/x11/x11-priv.h:29: included_from: Included from here.
libxkbcommon-1.7.0/src/x11/keymap.c:26: included_from: Included from here.
libxkbcommon-1.7.0/src/x11/keymap.c:1071:5: note: in expansion of macro ‘FAIL_IF_BAD_REPLY’
libxkbcommon-1.7.0/src/x11/keymap.c:65:11: note: in definition of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:1073:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:881:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:882:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:882:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:890:9: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:892:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:892:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:892:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:892:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:892:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
# 83| if ((nmemb) > 0) { \
# 84| (arr) = calloc((nmemb), sizeof(*(arr))); \
# 85|-> if (!(arr)) \
# 86| goto fail; \
# 87| } \
Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libxkbcommon-1.7.0/src/x11/keymap.c: scope_hint: In function ‘get_sym_maps’
libxkbcommon-1.7.0/src/x11/keymap.c:85:12: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)(*wire_sym_map.groupInfo & 15), 24)’
libxkbcommon-1.7.0/src/x11/keymap.c:448:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:680:5: note: in expansion of macro ‘FAIL_IF_BAD_REPLY’
libxkbcommon-1.7.0/src/x11/keymap.c:430:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:65:11: note: in definition of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:431:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:65:11: note: in definition of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:432:5: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:437:5: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:447:9: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:448:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:459:9: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:472:13: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:447:9: note: in expansion of macro ‘FAIL_UNLESS’
libxkbcommon-1.7.0/src/x11/keymap.c:448:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:448:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:448:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:448:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
libxkbcommon-1.7.0/src/x11/keymap.c:448:9: note: in expansion of macro ‘ALLOC_OR_FAIL’
# 83| if ((nmemb) > 0) { \
# 84| (arr) = calloc((nmemb), sizeof(*(arr))); \
# 85|-> if (!(arr)) \
# 86| goto fail; \
# 87| } \
Error: CLANG_WARNING: [#def32]
libxkbcommon-1.7.0/src/x11/keymap.c:385:30: warning[core.NullDereference]: Access to field 'level' results in a dereference of a null pointer (loaded from variable 'entry')
# 383| FAIL_UNLESS(wire_entry->level < type->num_levels);
# 384|
# 385|-> entry->level = wire_entry->level;
# 386| entry->mods.mods = translate_mods(wire_entry->mods_mods,
# 387| wire_entry->mods_vmods, 0);
Error: COMPILER_WARNING: [#def33]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:67:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[24]’
# 67 | expr->common.type = STMT_EXPR;
# | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 24 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 65| return NULL;
# 66|
# 67|-> expr->common.type = STMT_EXPR;
# 68| expr->common.next = NULL;
# 69| expr->expr.op = op;
Error: COMPILER_WARNING: [#def34]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:67:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 67 | expr->common.type = STMT_EXPR;
# | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 65| return NULL;
# 66|
# 67|-> expr->common.type = STMT_EXPR;
# 68| expr->common.next = NULL;
# 69| expr->expr.op = op;
Error: COMPILER_WARNING: [#def35]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:67:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 67 | expr->common.type = STMT_EXPR;
# | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 65| return NULL;
# 66|
# 67|-> expr->common.type = STMT_EXPR;
# 68| expr->common.next = NULL;
# 69| expr->expr.op = op;
Error: COMPILER_WARNING: [#def36]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:68:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[24]’
# 68 | expr->common.next = NULL;
# | ^
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 24 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 66|
# 67| expr->common.type = STMT_EXPR;
# 68|-> expr->common.next = NULL;
# 69| expr->expr.op = op;
# 70| expr->expr.value_type = type;
Error: COMPILER_WARNING: [#def37]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:68:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 68 | expr->common.next = NULL;
# | ^
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 66|
# 67| expr->common.type = STMT_EXPR;
# 68|-> expr->common.next = NULL;
# 69| expr->expr.op = op;
# 70| expr->expr.value_type = type;
Error: COMPILER_WARNING: [#def38]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:68:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 68 | expr->common.next = NULL;
# | ^
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 66|
# 67| expr->common.type = STMT_EXPR;
# 68|-> expr->common.next = NULL;
# 69| expr->expr.op = op;
# 70| expr->expr.value_type = type;
Error: COMPILER_WARNING: [#def39]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:69:19: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[24]’
# 69 | expr->expr.op = op;
# | ~~~~~~~~~~~~~~^~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 24 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 67| expr->common.type = STMT_EXPR;
# 68| expr->common.next = NULL;
# 69|-> expr->expr.op = op;
# 70| expr->expr.value_type = type;
# 71|
Error: COMPILER_WARNING: [#def40]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:69:19: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 69 | expr->expr.op = op;
# | ~~~~~~~~~~~~~~^~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 67| expr->common.type = STMT_EXPR;
# 68| expr->common.next = NULL;
# 69|-> expr->expr.op = op;
# 70| expr->expr.value_type = type;
# 71|
Error: COMPILER_WARNING: [#def41]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:69:19: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 69 | expr->expr.op = op;
# | ~~~~~~~~~~~~~~^~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 67| expr->common.type = STMT_EXPR;
# 68| expr->common.next = NULL;
# 69|-> expr->expr.op = op;
# 70| expr->expr.value_type = type;
# 71|
Error: COMPILER_WARNING: [#def42]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:70:27: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[24]’
# 70 | expr->expr.value_type = type;
# | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 24 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 68| expr->common.next = NULL;
# 69| expr->expr.op = op;
# 70|-> expr->expr.value_type = type;
# 71|
# 72| return expr;
Error: COMPILER_WARNING: [#def43]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:70:27: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 70 | expr->expr.value_type = type;
# | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 68| expr->common.next = NULL;
# 69| expr->expr.op = op;
# 70|-> expr->expr.value_type = type;
# 71|
# 72| return expr;
Error: COMPILER_WARNING: [#def44]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:70:27: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 70 | expr->expr.value_type = type;
# | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 68| expr->common.next = NULL;
# 69| expr->expr.op = op;
# 70|-> expr->expr.value_type = type;
# 71|
# 72| return expr;
Error: COMPILER_WARNING: [#def45]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateString’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:81:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 81 | expr->string.str = str;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 79| if (!expr)
# 80| return NULL;
# 81|-> expr->string.str = str;
# 82| return expr;
# 83| }
Error: COMPILER_WARNING: [#def46]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateInteger’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:91:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 91 | expr->integer.ival = ival;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 89| if (!expr)
# 90| return NULL;
# 91|-> expr->integer.ival = ival;
# 92| return expr;
# 93| }
Error: COMPILER_WARNING: [#def47]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateBoolean’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:110:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 110 | expr->boolean.set = set;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 108| if (!expr)
# 109| return NULL;
# 110|-> expr->boolean.set = set;
# 111| return expr;
# 112| }
Error: COMPILER_WARNING: [#def48]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:110:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 110 | expr->boolean.set = set;
# | ~~~~~~~~~~~~~~~~~~^~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 108| if (!expr)
# 109| return NULL;
# 110|-> expr->boolean.set = set;
# 111| return expr;
# 112| }
Error: COMPILER_WARNING: [#def49]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateKeyName’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:120:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 120 | expr->key_name.key_name = key_name;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 118| if (!expr)
# 119| return NULL;
# 120|-> expr->key_name.key_name = key_name;
# 121| return expr;
# 122| }
Error: COMPILER_WARNING: [#def50]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateIdent’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:130:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 130 | expr->ident.ident = ident;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 128| if (!expr)
# 129| return NULL;
# 130|-> expr->ident.ident = ident;
# 131| return expr;
# 132| }
Error: COMPILER_WARNING: [#def51]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:130:23: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 130 | expr->ident.ident = ident;
# | ~~~~~~~~~~~~~~~~~~^~~~~~~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 128| if (!expr)
# 129| return NULL;
# 130|-> expr->ident.ident = ident;
# 131| return expr;
# 132| }
Error: COMPILER_WARNING: [#def52]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateUnary’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:141:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 141 | expr->unary.child = child;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 139| if (!expr)
# 140| return NULL;
# 141|-> expr->unary.child = child;
# 142| return expr;
# 143| }
Error: COMPILER_WARNING: [#def53]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateBinary’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:153:13: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 153 | expr->expr.value_type = right->expr.value_type;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 151|
# 152| if (op == EXPR_ASSIGN || left->expr.value_type == EXPR_TYPE_UNKNOWN)
# 153|-> expr->expr.value_type = right->expr.value_type;
# 154| else if (left->expr.value_type == right->expr.value_type ||
# 155| right->expr.value_type == EXPR_TYPE_UNKNOWN)
Error: COMPILER_WARNING: [#def54]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateBinary’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:156:13: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 156 | expr->expr.value_type = left->expr.value_type;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 154| else if (left->expr.value_type == right->expr.value_type ||
# 155| right->expr.value_type == EXPR_TYPE_UNKNOWN)
# 156|-> expr->expr.value_type = left->expr.value_type;
# 157| expr->binary.left = left;
# 158| expr->binary.right = right;
Error: COMPILER_WARNING: [#def55]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateBinary’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:157:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 157 | expr->binary.left = left;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 155| right->expr.value_type == EXPR_TYPE_UNKNOWN)
# 156| expr->expr.value_type = left->expr.value_type;
# 157|-> expr->binary.left = left;
# 158| expr->binary.right = right;
# 159|
Error: COMPILER_WARNING: [#def56]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateBinary’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:158:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 158 | expr->binary.right = right;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 156| expr->expr.value_type = left->expr.value_type;
# 157| expr->binary.left = left;
# 158|-> expr->binary.right = right;
# 159|
# 160| return expr;
Error: COMPILER_WARNING: [#def57]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateFieldRef’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:169:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 169 | expr->field_ref.element = element;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 167| if (!expr)
# 168| return NULL;
# 169|-> expr->field_ref.element = element;
# 170| expr->field_ref.field = field;
# 171| return expr;
Error: COMPILER_WARNING: [#def58]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateFieldRef’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:170:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 170 | expr->field_ref.field = field;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 168| return NULL;
# 169| expr->field_ref.element = element;
# 170|-> expr->field_ref.field = field;
# 171| return expr;
# 172| }
Error: COMPILER_WARNING: [#def59]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateArrayRef’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:180:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 180 | expr->array_ref.element = element;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 178| if (!expr)
# 179| return NULL;
# 180|-> expr->array_ref.element = element;
# 181| expr->array_ref.field = field;
# 182| expr->array_ref.entry = entry;
Error: COMPILER_WARNING: [#def60]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateArrayRef’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:181:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 181 | expr->array_ref.field = field;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 179| return NULL;
# 180| expr->array_ref.element = element;
# 181|-> expr->array_ref.field = field;
# 182| expr->array_ref.entry = entry;
# 183| return expr;
Error: COMPILER_WARNING: [#def61]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateArrayRef’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:182:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 182 | expr->array_ref.entry = entry;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 180| expr->array_ref.element = element;
# 181| expr->array_ref.field = field;
# 182|-> expr->array_ref.entry = entry;
# 183| return expr;
# 184| }
Error: COMPILER_WARNING: [#def62]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateAction’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:192:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 192 | expr->action.name = name;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 190| if (!expr)
# 191| return NULL;
# 192|-> expr->action.name = name;
# 193| expr->action.args = args;
# 194| return expr;
Error: COMPILER_WARNING: [#def63]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateAction’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:193:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[40]’
# 193 | expr->action.args = args;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 40 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 191| return NULL;
# 192| expr->action.name = name;
# 193|-> expr->action.args = args;
# 194| return expr;
# 195| }
Error: COMPILER_WARNING: [#def64]
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c: scope_hint: In function ‘ExprCreateActionList’
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:203:9: warning[-Warray-bounds=]: array subscript ‘union ExprDef[0]’ is partly outside array bounds of ‘unsigned char[32]’
# 203 | expr->actions.actions = actions;
# | ^~
libxkbcommon-1.7.0/src/xkbcomp/ast-build.c:63:21: note: object of size 32 allocated by ‘malloc’
# 63 | ExprDef *expr = malloc(size);
# | ^~~~~~~~~~~~
# 201| if (!expr)
# 202| return NULL;
# 203|-> expr->actions.actions = actions;
# 204| return expr;
# 205| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def65]
libxkbcommon-1.7.0/src/xkbcomp/rules.c: scope_hint: In function ‘read_rules_file’
libxkbcommon-1.7.0/src/xkbcomp/rules.c:1107:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘matcher’
# 1105| }
# 1106|
# 1107|-> scanner_init(&scanner, matcher->ctx, string, size, path, NULL);
# 1108|
# 1109| /* Basic detection of wrong character encoding.
Error: CPPCHECK_WARNING (CWE-476): [#def66]
libxkbcommon-1.7.0/src/xkbcomp/rules.c:1159: error[nullPointer]: Null pointer dereference: (unsigned int*)(NULL)
# 1157| }
# 1158|
# 1159|-> darray_steal(matcher->kccgst[KCCGST_KEYCODES], &out->keycodes, NULL);
# 1160| darray_steal(matcher->kccgst[KCCGST_TYPES], &out->types, NULL);
# 1161| darray_steal(matcher->kccgst[KCCGST_COMPAT], &out->compat, NULL);
Error: CPPCHECK_WARNING (CWE-476): [#def67]
libxkbcommon-1.7.0/src/xkbcomp/rules.c:1160: error[nullPointer]: Null pointer dereference: (unsigned int*)(NULL)
# 1158|
# 1159| darray_steal(matcher->kccgst[KCCGST_KEYCODES], &out->keycodes, NULL);
# 1160|-> darray_steal(matcher->kccgst[KCCGST_TYPES], &out->types, NULL);
# 1161| darray_steal(matcher->kccgst[KCCGST_COMPAT], &out->compat, NULL);
# 1162| darray_steal(matcher->kccgst[KCCGST_SYMBOLS], &out->symbols, NULL);
Error: CPPCHECK_WARNING (CWE-476): [#def68]
libxkbcommon-1.7.0/src/xkbcomp/rules.c:1161: error[nullPointer]: Null pointer dereference: (unsigned int*)(NULL)
# 1159| darray_steal(matcher->kccgst[KCCGST_KEYCODES], &out->keycodes, NULL);
# 1160| darray_steal(matcher->kccgst[KCCGST_TYPES], &out->types, NULL);
# 1161|-> darray_steal(matcher->kccgst[KCCGST_COMPAT], &out->compat, NULL);
# 1162| darray_steal(matcher->kccgst[KCCGST_SYMBOLS], &out->symbols, NULL);
# 1163| darray_free(matcher->kccgst[KCCGST_GEOMETRY]);
Error: CPPCHECK_WARNING (CWE-476): [#def69]
libxkbcommon-1.7.0/src/xkbcomp/rules.c:1162: error[nullPointer]: Null pointer dereference: (unsigned int*)(NULL)
# 1160| darray_steal(matcher->kccgst[KCCGST_TYPES], &out->types, NULL);
# 1161| darray_steal(matcher->kccgst[KCCGST_COMPAT], &out->compat, NULL);
# 1162|-> darray_steal(matcher->kccgst[KCCGST_SYMBOLS], &out->symbols, NULL);
# 1163| darray_free(matcher->kccgst[KCCGST_GEOMETRY]);
# 1164|
Error: CLANG_WARNING: [#def70]
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:871:44: warning[core.NullDereference]: Dereference of null pointer
# 869| "Expected a virtual modifier mask, found %s; "
# 870| "Ignoring virtual modifiers definition for key %s\n",
# 871|-> expr_op_type_to_string(value->expr.op),
# 872| KeyInfoText(info, keyi));
# 873| return false;
Error: CLANG_WARNING: [#def71]
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1030:50: warning[core.NullDereference]: Array access (via field 'item') results in a null pointer dereference
# 1028| if (group_to_use >= darray_size(info->group_names))
# 1029| darray_resize0(info->group_names, group_to_use + 1);
# 1030|-> darray_item(info->group_names, group_to_use) = name;
# 1031|
# 1032| return true;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def72]
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1154:57: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c: scope_hint: In function ‘SetExplicitGroup’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c: scope_hint: In function ‘SetExplicitGroup’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c: scope_hint: In function ‘SetExplicitGroup’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c: scope_hint: In function ‘SetExplicitGroup’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c: scope_hint: In function ‘SetExplicitGroup’
libxkbcommon-1.7.0/src/darray.h:154:5: note: in expansion of macro ‘darray_growalloc’
libxkbcommon-1.7.0/src/darray.h:106:5: note: in expansion of macro ‘darray_resize’
libxkbcommon-1.7.0/src/darray.h:112:5: note: in expansion of macro ‘darray_from_items’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1169:5: note: in expansion of macro ‘darray_copy’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1135:5: note: in expansion of macro ‘darray_enumerate_from’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1135:5: note: in expansion of macro ‘darray_enumerate_from’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1135:5: note: in expansion of macro ‘darray_enumerate_from’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1152:5: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1152:5: note: in expansion of macro ‘darray_resize0’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1155:13: note: in expansion of macro ‘darray_item’
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1155:13: note: in expansion of macro ‘darray_item’
# 1152| darray_resize0(keyi->groups, info->explicit_group + 1);
# 1153| if (info->explicit_group > 0) {
# 1154|-> darray_item(keyi->groups, info->explicit_group) =
# 1155| darray_item(keyi->groups, 0);
# 1156| InitGroupInfo(&darray_item(keyi->groups, 0));
Error: CPPCHECK_WARNING (CWE-476): [#def73]
libxkbcommon-1.7.0/src/xkbcomp/symbols.c:1534: error[nullPointer]: Null pointer dereference: (unsigned int*)(NULL)
# 1532| /* Copy levels. */
# 1533| darray_enumerate(i, groupi, keyi->groups)
# 1534|-> darray_steal(groupi->levels, &key->groups[i].levels, NULL);
# 1535|
# 1536| key->out_of_range_group_number = keyi->out_of_range_group_number;
Error: CPPCHECK_WARNING (CWE-758): [#def74]
libxkbcommon-1.7.0/test/common.c:130: warning[objectIndex]: The address of local variable 'sym' might be accessed at non-zero index.
# 128| for (i = 0; i < nsyms; i++) {
# 129| keysym = va_arg(ap, int);
# 130|-> xkb_keysym_get_name(syms[i], ksbuf, sizeof(ksbuf));
# 131| fprintf(stderr, "%s%s", (i != 0) ? ", " : "", ksbuf);
# 132|
Error: CPPCHECK_WARNING (CWE-758): [#def75]
libxkbcommon-1.7.0/test/common.c:134: warning[objectIndex]: The address of local variable 'sym' might be accessed at non-zero index.
# 132|
# 133| if (keysym == FINISH || keysym == NEXT) {
# 134|-> xkb_keysym_get_name(syms[i], ksbuf, sizeof(ksbuf));
# 135| fprintf(stderr, " Did not expect keysym: %s.\n", ksbuf);
# 136| goto fail;
Error: CLANG_WARNING: [#def76]
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: [#def77]
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: [#def78]
libxkbcommon-1.7.0/test/compose.c:968:5: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 966| const char *srcdir = getenv("top_srcdir");
# 967| clearenv();
# 968|-> setenv("top_srcdir", srcdir, 1);
# 969| #else
# 970| unsetenv("XCOMPOSEFILE");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
libxkbcommon-1.7.0/src/darray.h:31: included_from: Included from here.
libxkbcommon-1.7.0/src/utils.h:56: included_from: Included from here.
libxkbcommon-1.7.0/test/test.h:32: included_from: Included from here.
libxkbcommon-1.7.0/test/keymap.c:32: included_from: Included from here.
libxkbcommon-1.7.0/test/keymap.c: scope_hint: In function ‘test_numeric_keysyms’
libxkbcommon-1.7.0/test/keymap.c:178:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/keymap.c: scope_hint: In function ‘test_numeric_keysyms’
# 176| assert(keysyms[0] == 0x1ffffffd);
# 177| key = XkbKey(keymap, kc);
# 178|-> assert(key->modmap == Mod1Mask);
# 179|
# 180| kc = xkb_keymap_key_by_name(keymap, "AD02");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def80]
libxkbcommon-1.7.0/test/keymap.c:185:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/keymap.c: scope_hint: In function ‘test_numeric_keysyms’
libxkbcommon-1.7.0/test/keymap.c: scope_hint: In function ‘test_numeric_keysyms’
# 183| assert(keysyms[0] == 0x1ffffffe);
# 184| key = XkbKey(keymap, kc);
# 185|-> assert(key->modmap == Mod2Mask);
# 186|
# 187| kc = xkb_keymap_key_by_name(keymap, "AD03");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
libxkbcommon-1.7.0/test/keymap.c:195:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/keymap.c: scope_hint: In function ‘test_numeric_keysyms’
libxkbcommon-1.7.0/test/keymap.c: scope_hint: In function ‘test_numeric_keysyms’
libxkbcommon-1.7.0/test/keymap.c: scope_hint: In function ‘test_numeric_keysyms’
# 193| assert(keysyms_count == 0);
# 194| key = XkbKey(keymap, kc);
# 195|-> assert(key->modmap == Mod3Mask);
# 196|
# 197| xkb_keymap_unref(keymap);
Error: CLANG_WARNING: [#def82]
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: GCC_ANALYZER_WARNING (CWE-476): [#def83]
libxkbcommon-1.7.0/src/darray.h:31: included_from: Included from here.
libxkbcommon-1.7.0/src/utils.h:56: included_from: Included from here.
libxkbcommon-1.7.0/test/test.h:32: included_from: Included from here.
libxkbcommon-1.7.0/test/modifiers.c:30: included_from: Included from here.
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c:58:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 56| assert(keycode != XKB_KEYCODE_INVALID);
# 57| key = XkbKey(keymap, keycode);
# 58|-> assert(key->modmap == NoModifier);
# 59|
# 60| keycode = xkb_keymap_key_by_name(keymap, "LFSH");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def84]
libxkbcommon-1.7.0/test/modifiers.c:63:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 61| assert(keycode != XKB_KEYCODE_INVALID);
# 62| key = XkbKey(keymap, keycode);
# 63|-> assert(key->modmap == NoModifier);
# 64|
# 65| keycode = xkb_keymap_key_by_name(keymap, "RTSH");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
libxkbcommon-1.7.0/test/modifiers.c:68:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 66| assert(keycode != XKB_KEYCODE_INVALID);
# 67| key = XkbKey(keymap, keycode);
# 68|-> assert(key->modmap == NoModifier);
# 69|
# 70| keycode = xkb_keymap_key_by_name(keymap, "LWIN");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def86]
libxkbcommon-1.7.0/test/modifiers.c:73:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 71| assert(keycode != XKB_KEYCODE_INVALID);
# 72| key = XkbKey(keymap, keycode);
# 73|-> assert(key->modmap == Mod4Mask);
# 74|
# 75| keycode = xkb_keymap_key_by_name(keymap, "RWIN");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def87]
libxkbcommon-1.7.0/test/modifiers.c:78:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 76| assert(keycode != XKB_KEYCODE_INVALID);
# 77| key = XkbKey(keymap, keycode);
# 78|-> assert(key->modmap == Mod4Mask);
# 79|
# 80| keycode = xkb_keymap_key_by_name(keymap, "LCTL");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def88]
libxkbcommon-1.7.0/test/modifiers.c:83:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 81| assert(keycode != XKB_KEYCODE_INVALID);
# 82| key = XkbKey(keymap, keycode);
# 83|-> assert(key->modmap == ControlMask);
# 84|
# 85| keycode = xkb_keymap_key_by_name(keymap, "RCTL");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def89]
libxkbcommon-1.7.0/test/modifiers.c:88:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 86| assert(keycode != XKB_KEYCODE_INVALID);
# 87| key = XkbKey(keymap, keycode);
# 88|-> assert(key->modmap == ControlMask);
# 89|
# 90| keycode = xkb_keymap_key_by_name(keymap, "LALT");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def90]
libxkbcommon-1.7.0/test/modifiers.c:93:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 91| assert(keycode != XKB_KEYCODE_INVALID);
# 92| key = XkbKey(keymap, keycode);
# 93|-> assert(key->modmap == Mod1Mask);
# 94|
# 95| keycode = xkb_keymap_key_by_name(keymap, "RALT");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def91]
libxkbcommon-1.7.0/test/modifiers.c:98:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 96| assert(keycode != XKB_KEYCODE_INVALID);
# 97| key = XkbKey(keymap, keycode);
# 98|-> assert(key->modmap == (Mod2Mask | Mod5Mask));
# 99|
# 100| keycode = xkb_keymap_key_by_name(keymap, "CAPS");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def92]
libxkbcommon-1.7.0/test/modifiers.c:103:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 101| assert(keycode != XKB_KEYCODE_INVALID);
# 102| key = XkbKey(keymap, keycode);
# 103|-> assert(key->modmap == LockMask);
# 104|
# 105| keycode = xkb_keymap_key_by_name(keymap, "AD01");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def93]
libxkbcommon-1.7.0/test/modifiers.c:108:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 106| assert(keycode != XKB_KEYCODE_INVALID);
# 107| key = XkbKey(keymap, keycode);
# 108|-> assert(key->modmap == Mod1Mask);
# 109|
# 110| keycode = xkb_keymap_key_by_name(keymap, "AD02");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def94]
libxkbcommon-1.7.0/test/modifiers.c:113:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 111| assert(keycode != XKB_KEYCODE_INVALID);
# 112| key = XkbKey(keymap, keycode);
# 113|-> assert(key->modmap == NoModifier);
# 114|
# 115| keycode = xkb_keymap_key_by_name(keymap, "AD03");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def95]
libxkbcommon-1.7.0/test/modifiers.c:118:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 116| assert(keycode != XKB_KEYCODE_INVALID);
# 117| key = XkbKey(keymap, keycode);
# 118|-> assert(key->modmap == NoModifier);
# 119|
# 120| keycode = xkb_keymap_key_by_name(keymap, "AD04");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def96]
libxkbcommon-1.7.0/test/modifiers.c:123:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 121| assert(keycode != XKB_KEYCODE_INVALID);
# 122| key = XkbKey(keymap, keycode);
# 123|-> assert(key->modmap == Mod1Mask);
# 124|
# 125| keycode = xkb_keymap_key_by_name(keymap, "AD05");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def97]
libxkbcommon-1.7.0/test/modifiers.c:128:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 126| assert(keycode != XKB_KEYCODE_INVALID);
# 127| key = XkbKey(keymap, keycode);
# 128|-> assert(key->modmap == Mod2Mask);
# 129|
# 130| keycode = xkb_keymap_key_by_name(keymap, "AD06");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def98]
libxkbcommon-1.7.0/test/modifiers.c:133:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 131| assert(keycode != XKB_KEYCODE_INVALID);
# 132| key = XkbKey(keymap, keycode);
# 133|-> assert(key->modmap == Mod3Mask);
# 134|
# 135| keycode = xkb_keymap_key_by_name(keymap, "AD07");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def99]
libxkbcommon-1.7.0/test/modifiers.c:138:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 136| assert(keycode != XKB_KEYCODE_INVALID);
# 137| key = XkbKey(keymap, keycode);
# 138|-> assert(key->modmap == Mod1Mask);
# 139|
# 140| keycode = xkb_keymap_key_by_name(keymap, "AD08");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def100]
libxkbcommon-1.7.0/test/modifiers.c:143:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 141| assert(keycode != XKB_KEYCODE_INVALID);
# 142| key = XkbKey(keymap, keycode);
# 143|-> assert(key->modmap == Mod2Mask);
# 144|
# 145| keycode = xkb_keymap_key_by_name(keymap, "AD09");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def101]
libxkbcommon-1.7.0/test/modifiers.c:148:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
libxkbcommon-1.7.0/test/modifiers.c: scope_hint: In function ‘test_modmap_none’
# 146| assert(keycode != XKB_KEYCODE_INVALID);
# 147| key = XkbKey(keymap, keycode);
# 148|-> assert(key->modmap == Mod3Mask);
# 149|
# 150| xkb_keymap_unref(keymap);
Error: CPPCHECK_WARNING (CWE-570): [#def102]
libxkbcommon-1.7.0/test/xvfb-wrapper.c:151: error[comparePointers]: Comparing pointers that point to different objects
# 149|
# 150| for (const struct test_function *t = &__start_test_func_sec;
# 151|-> t < &__stop_test_func_sec;
# 152| t++)
# 153| count++;
Error: CPPCHECK_WARNING (CWE-570): [#def103]
libxkbcommon-1.7.0/test/xvfb-wrapper.c:157: error[comparePointers]: Comparing pointers that point to different objects
# 155| int rc;
# 156| for (const struct test_function *t = &__start_test_func_sec;
# 157|-> t < &__stop_test_func_sec;
# 158| t++) {
# 159| fprintf(stderr, "Running test: %s from %s\n", t->name, t->file);
Error: CPPCHECK_WARNING (CWE-457): [#def104]
libxkbcommon-1.7.0/test/xvfb-wrapper.c:166: warning[uninitvar]: Uninitialized variable: rc
# 164| }
# 165|
# 166|-> return rc;
# 167| }
Error: CLANG_WARNING: [#def105]
libxkbcommon-1.7.0/test/xvfb-wrapper.c:166:5: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
# 164| }
# 165|
# 166|-> return rc;
# 167| }
Error: CLANG_WARNING: [#def106]
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): [#def107]
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): [#def108]
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): [#def109]
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: [#def110]
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: [#def111]
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);
Error: CPPCHECK_WARNING (CWE-758): [#def112]
libxkbcommon-1.7.0/tools/tools-common.c:201: warning[objectIndex]: The address of local variable 'sym' might be accessed at non-zero index.
# 199| printf("keysyms [ ");
# 200| for (int i = 0; i < nsyms; i++) {
# 201|-> xkb_keysym_get_name(syms[i], s, sizeof(s));
# 202| printf("%-*s ", XKB_KEYSYM_NAME_MAX_SIZE, s);
# 203| }
Scan Properties
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-43.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libxkbcommon-1.7.0-1.fc41 |
store-results-to | /tmp/tmpo4cfd8cm/libxkbcommon-1.7.0-1.fc41.tar.xz |
time-created | 2024-04-22 11:09:09 |
time-finished | 2024-04-22 11:15:43 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpo4cfd8cm/libxkbcommon-1.7.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpo4cfd8cm/libxkbcommon-1.7.0-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |