aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJohn Stultz <[email protected]>2020-03-10 03:27:35 +0000
committerMarge Bot <[email protected]>2020-03-11 02:52:58 +0000
commitbe22995ecf868a90c6b14fce9b907cf302459e71 (patch)
treeeb518c9377dfbd38a5c47a0e5a16f7ade93bd383 /src/gallium/auxiliary
parent09fbde830f30c8a316710ef827c323be8e43bc7c (diff)
gallium: hud_context: Fix scalar initializer warning.
When trying to build mesa/master under AOSP, I've run into the following error: external/mesa3d/src/gallium/auxiliary/hud/hud_context.c:1821:31: error: braces around scalar initializer [-Werror,-Wbraced-scalar-init] struct sigaction action = {{0}}; ^~~ 1 error generated. This patch addresses this by switching to using memset instead of using an initializer. Signed-off-by: John Stultz <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4141> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4141>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index bc06265cad8..1e2b948e348 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -1818,7 +1818,9 @@ hud_create(struct cso_context *cso, struct hud_context *share)
#ifdef PIPE_OS_UNIX
unsigned signo = debug_get_num_option("GALLIUM_HUD_TOGGLE_SIGNAL", 0);
static boolean sig_handled = FALSE;
- struct sigaction action = {{0}};
+ struct sigaction action;
+
+ memset(&action, 0, sizeof(action));
#endif
huds_visible = debug_get_bool_option("GALLIUM_HUD_VISIBLE", TRUE);
hud_scale = debug_get_num_option("GALLIUM_HUD_SCALE", 1);