diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-11-02 20:04:24 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-11-02 21:10:40 +0100 |
commit | 435be14610a4b4538adc6a926160ed434ff630fa (patch) | |
tree | 1c40373dbc5a9e86409138eaf638eb2127a8802f /swaybg.1.scd | |
parent | a67361ed48bd63d7f1bda7e61140c64aecc72b9a (diff) | |
download | swaybg-435be14610a4b4538adc6a926160ed434ff630fa.tar.gz swaybg-435be14610a4b4538adc6a926160ed434ff630fa.tar.bz2 |
main.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
`swaybg` triggers it on `calloc()` calls where member size is used as
`1` (instead of member count):
../main.c:492:32: error: allocation of insufficient size '1' for type 'struct swaybg_output_config' with size '48' [-Werror=alloc-size]
492 | config = calloc(sizeof(struct swaybg_output_config), 1);
| ^
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions