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>
This commit is contained in:
Jonas Ådahl 2021-05-14 12:05:25 +02:00 committed by Marge Bot
parent 357c506ee7
commit 8afae2ebaf

View File

@ -185,7 +185,7 @@ static XSettingsList *
parse_settings (unsigned char *data, parse_settings (unsigned char *data,
size_t len) size_t len)
{ {
XSettingsBuffer buffer; XSettingsBuffer buffer = { 0 };
XSettingsResult result = XSETTINGS_SUCCESS; XSettingsResult result = XSETTINGS_SUCCESS;
XSettingsList *settings = NULL; XSettingsList *settings = NULL;
CARD32 serial; CARD32 serial;