[mutter/wip/carlosg/xdg-activation: 53/59] clutter/xsettings-client: Zero-initialize stack struct
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/xdg-activation: 53/59] clutter/xsettings-client: Zero-initialize stack struct
- Date: Wed, 7 Jul 2021 20:39:01 +0000 (UTC)
commit 0e343d3c1fe622460cd36e5f6a728072650dd50e
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 &&
| ~~~~~~^~~~~~~~~~~
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]