[mutter] clutter/xsettings-client: Zero-initialize stack struct
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/xsettings-client: Zero-initialize stack struct
- Date: Thu, 8 Jul 2021 13:39:58 +0000 (UTC)
commit 8afae2ebafbe4c4db22100111bbf7f9dccd82246
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri May 14 12:05:25 2021 +0200
clutter/xsettings-client: Zero-initialize stack struct
This fixes a warning/error:
In function 'parse_settings',
inlined from 'read_settings' at ../clutter/clutter/x11/xsettings/xsettings-client.c:398:25:
../clutter/clutter/x11/xsettings/xsettings-client.c:202:13: error: 'buffer.byte_order' may be used
uninitialized [-Werror=maybe-uninitialized]
202 | if (buffer.byte_order != MSBFirst &&
| ~~~~~~^~~~~~~~~~~
This is needed to bump the CI image from F33 to F34, which includes a
upgraded compiler.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1865>
clutter/clutter/x11/xsettings/xsettings-client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/clutter/clutter/x11/xsettings/xsettings-client.c
b/clutter/clutter/x11/xsettings/xsettings-client.c
index f231499013..120809c659 100644
--- a/clutter/clutter/x11/xsettings/xsettings-client.c
+++ b/clutter/clutter/x11/xsettings/xsettings-client.c
@@ -185,7 +185,7 @@ static XSettingsList *
parse_settings (unsigned char *data,
size_t len)
{
- XSettingsBuffer buffer;
+ XSettingsBuffer buffer = { 0 };
XSettingsResult result = XSETTINGS_SUCCESS;
XSettingsList *settings = NULL;
CARD32 serial;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]