diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-11-03 12:17:39 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-11-03 13:25:27 +0100 |
commit | 020a572ed615b8fe272c7566a27ee0abe73a58d7 (patch) | |
tree | cde2646b4189b7c8bac9c73d255165242f358f3b /sway/input/seat.c | |
parent | 6f6b82793d95e3c10d54bcf21ca3f0c76c44b882 (diff) |
swaynag/config.c: fix build against gcc-14 (-Walloc-size)
`gcc-14` added a new `-Walloc-size` warning that makes sure that size of
an individual element matches size of a pointed type:
https://gcc.gnu.org/PR71219
`sway` triggers it on `calloc()` calls where member size is used as
`1` (instead of member count):
swaynag/config.c:169:65: error: allocation of insufficient size '1'
for type 'struct swaynag_button' with size '48' [-Werror=alloc-size]
169 | struct swaynag_button *button = calloc(sizeof(struct swaynag_button), 1);
Diffstat (limited to 'sway/input/seat.c')
0 files changed, 0 insertions, 0 deletions