0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch 1.1 KB

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