libXext: Changes to 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 8 17:39:18 UTC 2023
src/XEVI.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 6cb21433d745abea3a161a6fc8e141f7e08b2c27
Author: Sam James <sam at gentoo.org>
Date: Tue Nov 7 23:03:27 2023 +0000
XEVI: fix -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which gives (when forced
to be an error):
```
XEVI.c:174:21: error: allocation of insufficient size '1' for type 'ExtendedVisualInfo' with size '48' [-Werror=alloc-size]
174 | *evi_return = Xcalloc(sz_info + sz_conflict, 1);
| ^
```
The calloc prototype is:
```
void *calloc(size_t nmemb, size_t size);
```
(Xcalloc is esenetially the same.)
So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 element of size `sz_info + sz_conflict`. GCC then sees we're not
doing anything wrong.
Signed-off-by: Sam James <sam at gentoo.org>
More information about the xorg-commit
mailing list