[virt-tools-list] [PATCH virt-viewer 4/4] Fix missing field initializers
Eduardo Lima (Etrunko)
etrunko at redhat.com
Wed Jun 22 17:59:30 UTC 2016
This is not actually necessary as of C99. You only need to initialize
any field of a structure to get all other fields initialized too.
On 06/22/2016 03:17 AM, Pavel Grunt wrote:
> ---
> src/virt-viewer-display-spice.c | 2 +-
> src/virt-viewer-display-vnc.c | 2 +-
> src/virt-viewer-window.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
> index ee07507..a604230 100644
> --- a/src/virt-viewer-display-spice.c
> +++ b/src/virt-viewer-display-spice.c
> @@ -243,7 +243,7 @@ enable_accel_changed(VirtViewerApp *app,
> GParamSpec *pspec G_GNUC_UNUSED,
> VirtViewerDisplaySpice *self)
> {
> - GtkAccelKey key = { 0 };
> + GtkAccelKey key = {0, 0, 0};
> if (virt_viewer_app_get_enable_accel(app))
> gtk_accel_map_lookup_entry("<virt-viewer>/view/release-cursor", &key);
>
> diff --git a/src/virt-viewer-display-vnc.c b/src/virt-viewer-display-vnc.c
> index 390c366..cb45c23 100644
> --- a/src/virt-viewer-display-vnc.c
> +++ b/src/virt-viewer-display-vnc.c
> @@ -190,7 +190,7 @@ enable_accel_changed(VirtViewerApp *app,
> GParamSpec *pspec G_GNUC_UNUSED,
> VncDisplay *vnc)
> {
> - GtkAccelKey key = { 0 };
> + GtkAccelKey key = {0, 0, 0};
> if (virt_viewer_app_get_enable_accel(app))
> gtk_accel_map_lookup_entry("<virt-viewer>/view/release-cursor", &key);
>
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 6bf0a2e..c828916 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -1176,7 +1176,7 @@ virt_viewer_window_update_title(VirtViewerWindow *self)
>
> if (priv->grabbed) {
> gchar *label;
> - GtkAccelKey key = { 0 };
> + GtkAccelKey key = {0, 0, 0};
>
> if (virt_viewer_app_get_enable_accel(priv->app))
> gtk_accel_map_lookup_entry("<virt-viewer>/view/release-cursor", &key);
>
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com
More information about the virt-tools-list
mailing list