mmc-utils: Fix build with clang
PATCH 1/2 mmc-utils: Fix build with clang
clang has more warnings to report, lets fix them
--- ...tra-braces-when-initializing-subobje.patch | 32 +++++++++++++++++++ meta/recipes-devtools/mmc/mmc-utils_git.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch
meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 10 May 2019 12:58:01 -0700 +Subject: [PATCH] mmc_cmd.c: Use extra braces when initializing subobjects + +clang warns with -Werror,-Wmissing-braces, as following error +| mmc_cmds.c:1886:36: error: suggest braces around initialization of subobject [-Werror,-W +missing-braces] +| struct rpmb_frame frame_status = {0}; +| ^ +| {} + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + mmc_cmds.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mmc_cmds.c b/mmc_cmds.c +index 19a9da1..838e8c3 100644 +--- a/mmc_cmds.c ++++ b/mmc_cmds.c +@@ -1883,7 +1883,7 @@ static int do_rpmb_op(int fd, + u_int16_t rpmb_type; + struct mmc_ioc_multi_cmd *mioc; + struct mmc_ioc_cmd *ioc; +- struct rpmb_frame frame_status = {0}; ++ struct rpmb_frame frame_status = {{0}}; + + if (!frame_in || !frame_out || !out_cnt) + return -EINVAL;
meta/recipes-devtools/mmc/mmc-utils_git.bb +1 -0
@@ -9,6 +9,7 @@ SRCREV = "aef913e31b659462fe6b9320d241676cba97f67b" PV = "0.1+git${SRCPV}" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \ + file://0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch \ " UPSTREAM_CHECK_COMMITS = "1"
Signature · 1 line
2.21.0
PATCH 2/2 epiphany: Fix build with clang
This patch is upstreamable, issue is not caught by gcc
--- .../epiphany/epiphany_3.32.1.2.bb | 1 + ...itialization-of-variable-with-__attr.patch | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 meta/recipes-gnome/epiphany/files/0001-Do-not-bypass-initialization-of-variable-with-__attr.patch
meta/recipes-gnome/epiphany/epiphany_3.32.1.2.bb +1 -0
@@ -12,6 +12,7 @@ REQUIRED_DISTRO_FEATURES = "x11 opengl" SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ file://0002-help-meson.build-disable-the-use-of-yelp.patch \ + file://0001-Do-not-bypass-initialization-of-variable-with-__attr.patch \ " SRC_URI[archive.md5sum] = "93faec353e9f62519859e6164350fd5d" SRC_URI[archive.sha256sum] = "a8284fb9bbc8b7914a154a8eac1598c8b59ae421e0d685146fb48198427926be"
meta/recipes-gnome/epiphany/files/0001-Do-not-bypass-initialization-of-variable-with-__attr.patch new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
2.21.0
Re: [PATCH 2/2] epiphany: Fix build with clang
Quoted 2 lines · Khem Raj
This patch is upstreamable, issue is not caught by gcc
...
Upstream already has a different fix for this:
https://gitlab.gnome.org/GNOME/epiphany/commit/a6a022c9c498ad5dcf7f2220644a7520df74ca31
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [PATCH 2/2] epiphany: Fix build with clang
Quoted 6 lines · Adrian Bunk
Quoted 2 lines · Khem Raj
This patch is upstreamable, issue is not caught by gcc
...Upstream already has a different fix for this:
https://gitlab.gnome.org/GNOME/epiphany/commit/a6a022c9c498ad5dcf7f2220644a7520df74ca31
ah thanks, I did not find it when I checked last time. but I guess I will try a backport and send v2
Quoted 4 lines
cu
Adrian
ping^1
Quoted 63 lines · Khem Raj
clang has more warnings to report, lets fix them
Signed-off-by Khem Raj <[email protected]>--- ...tra-braces-when-initializing-subobje.patch | 32 +++++++++++++++++++ meta/recipes-devtools/mmc/mmc-utils_git.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patchmeta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch new file +32
-0@@ -0,0 +1,32 @@ +From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 10 May 2019 12:58:01 -0700 +Subject: [PATCH] mmc_cmd.c: Use extra braces when initializing subobjects + +clang warns with -Werror,-Wmissing-braces, as following error +| mmc_cmds.c:1886:36: error: suggest braces around initialization of subobject [-Werror,-W +missing-braces] +| struct rpmb_frame frame_status = {0}; +| ^ +| {} + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + mmc_cmds.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mmc_cmds.c b/mmc_cmds.c +index 19a9da1..838e8c3 100644 +--- a/mmc_cmds.c ++++ b/mmc_cmds.c +@@ -1883,7 +1883,7 @@ static int do_rpmb_op(int fd, + u_int16_t rpmb_type; + struct mmc_ioc_multi_cmd *mioc; + struct mmc_ioc_cmd *ioc; +- struct rpmb_frame frame_status = {0}; ++ struct rpmb_frame frame_status = {{0}}; + + if (!frame_in || !frame_out || !out_cnt) + return -EINVAL;meta/recipes-devtools/mmc/mmc-utils_git.bb +1
-1@@ -9,6 +9,7 @@ SRCREV = "aef913e31b659462fe6b9320d241676cba97f67b" PV = "0.1+git${SRCPV}" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \ + file://0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch \ " UPSTREAM_CHECK_COMMITS = "1" --2.21.0