xref: /OK3568_Linux_fs/buildroot/package/mmc-utils/0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 6208cc78f6efd1fafc4f5bc6a487247a383df80f Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sat, 28 Sep 2019 20:44:52 +0200
4Subject: [PATCH] mmc_cmds.c: fix build with gcc 4.9
5
6Fix following error with gcc 4.9:
7
8mmc_cmds.c:1918:9: error: missing braces around initializer [-Werror=missing-braces]
9  struct rpmb_frame frame_status = {0};
10
11Fixes:
12 - http://autobuild.buildroot.org/results/bf3b6f9f6ef39b99842b3c92495b7bf359c68158
13
14Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
15[Upstream status: sent to linux-mmc@vger.kernel.org]
16---
17 mmc_cmds.c | 4 +++-
18 1 file changed, 3 insertions(+), 1 deletion(-)
19
20diff --git a/mmc_cmds.c b/mmc_cmds.c
21index fb37189..6b09f26 100644
22--- a/mmc_cmds.c
23+++ b/mmc_cmds.c
24@@ -1915,7 +1915,9 @@ static int do_rpmb_op(int fd,
25 	u_int16_t rpmb_type;
26 	struct mmc_ioc_multi_cmd *mioc;
27 	struct mmc_ioc_cmd *ioc;
28-	struct rpmb_frame frame_status = {0};
29+	struct rpmb_frame frame_status;
30+
31+	memset(&frame_status, 0, sizeof(frame_status));
32
33 	if (!frame_in || !frame_out || !out_cnt)
34 		return -EINVAL;
35--
362.23.0
37
38