Message ID | 20190510204954.33591-1-raj.khem@gmail.com |
---|---|
State | Accepted |
Commit | 44b06d940bc3d623c57df0b06092548912a903c2 |
Headers | show |
Series | [1/2] mmc-utils: Fix build with clang | expand |
ping^1 On Fri, May 10, 2019 at 4:50 PM Khem Raj <raj.khem@gmail.com> wrote: > > clang has more warnings to report, lets fix them > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > --- > ...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 > > diff --git a/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch b/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch > new file mode 100644 > index 0000000000..12707357b2 > --- /dev/null > +++ b/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch > @@ -0,0 +1,32 @@ > +From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001 > +From: Khem Raj <raj.khem@gmail.com> > +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 <raj.khem@gmail.com> > +--- > + 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; > diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb > index f3a7234670..0c401c86fa 100644 > --- a/meta/recipes-devtools/mmc/mmc-utils_git.bb > +++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb > @@ -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 > -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff --git a/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch b/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch new file mode 100644 index 0000000000..12707357b2 --- /dev/null +++ b/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch @@ -0,0 +1,32 @@ +From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +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 <raj.khem@gmail.com> +--- + 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; diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb index f3a7234670..0c401c86fa 100644 --- a/meta/recipes-devtools/mmc/mmc-utils_git.bb +++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb @@ -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"
clang has more warnings to report, lets fix them Signed-off-by: Khem Raj <raj.khem@gmail.com> --- ...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 -- 2.21.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core