* [dpdk-dev] [PATCH] buildtools: zero elf info variable in pmdinfogen
@ 2017-09-05 13:03 Harry van Haaren
2017-09-05 13:18 ` Bruce Richardson
2017-09-05 13:27 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
0 siblings, 2 replies; 5+ messages in thread
From: Harry van Haaren @ 2017-09-05 13:03 UTC (permalink / raw)
To: dev; +Cc: Harry van Haaren
This commit zeros out the elf_info struct at startup of the
pmdinfogen code. If it is not zeroed, later in the code gcc
produces "may be unused" prints. Clang does not report any
issue.
This commit enables a simplification in the meson build
system, removing the requirement for "-Wno-maybe-uninitialized".
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
buildtools/pmdinfogen/pmdinfogen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index ba1a12e..e73fc76 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -397,7 +397,7 @@ static void output_pmd_info_string(struct elf_info *info, char *outfile)
int main(int argc, char **argv)
{
- struct elf_info info;
+ struct elf_info info = {0};
int rc = 1;
if (argc < 3) {
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] buildtools: zero elf info variable in pmdinfogen
2017-09-05 13:03 [dpdk-dev] [PATCH] buildtools: zero elf info variable in pmdinfogen Harry van Haaren
@ 2017-09-05 13:18 ` Bruce Richardson
2017-09-05 13:27 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
1 sibling, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2017-09-05 13:18 UTC (permalink / raw)
To: Harry van Haaren; +Cc: dev
On Tue, Sep 05, 2017 at 02:03:33PM +0100, Harry van Haaren wrote:
> This commit zeros out the elf_info struct at startup of the
> pmdinfogen code. If it is not zeroed, later in the code gcc
> produces "may be unused" prints. Clang does not report any
> issue.
>
> This commit enables a simplification in the meson build
> system, removing the requirement for "-Wno-maybe-uninitialized".
>
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
It's worth adding to the commit message that this error only shows up in
optimized builds, which is why the warning is not disabled by default in
the existing makefile.
> ---
>
> buildtools/pmdinfogen/pmdinfogen.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
> index ba1a12e..e73fc76 100644
> --- a/buildtools/pmdinfogen/pmdinfogen.c
> +++ b/buildtools/pmdinfogen/pmdinfogen.c
> @@ -397,7 +397,7 @@ static void output_pmd_info_string(struct elf_info *info, char *outfile)
>
> int main(int argc, char **argv)
> {
> - struct elf_info info;
> + struct elf_info info = {0};
> int rc = 1;
>
> if (argc < 3) {
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] buildtools: zero elf info variable in pmdinfogen
2017-09-05 13:03 [dpdk-dev] [PATCH] buildtools: zero elf info variable in pmdinfogen Harry van Haaren
2017-09-05 13:18 ` Bruce Richardson
@ 2017-09-05 13:27 ` Harry van Haaren
2017-09-05 14:36 ` Bruce Richardson
1 sibling, 1 reply; 5+ messages in thread
From: Harry van Haaren @ 2017-09-05 13:27 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, Harry van Haaren
This commit zeros out the elf_info struct at startup of the
pmdinfogen code. If it is not zeroed, later in the code gcc
produces "may be unused" prints. Clang does not report any
issue.
This issue is only observed when compiling pmdinfogen as an
optimized build, hence this warning is not disabled in the
existing Makefile.
This commit enables a simplification in the meson build
system, removing the requirement for "-Wno-maybe-uninitialized".
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
v2:
- Added note to commit message about optimized compiles (Bruce)
---
buildtools/pmdinfogen/pmdinfogen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index ba1a12e..e73fc76 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -397,7 +397,7 @@ static void output_pmd_info_string(struct elf_info *info, char *outfile)
int main(int argc, char **argv)
{
- struct elf_info info;
+ struct elf_info info = {0};
int rc = 1;
if (argc < 3) {
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] buildtools: zero elf info variable in pmdinfogen
2017-09-05 13:27 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
@ 2017-09-05 14:36 ` Bruce Richardson
2017-09-14 12:21 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2017-09-05 14:36 UTC (permalink / raw)
To: Harry van Haaren; +Cc: dev
On Tue, Sep 05, 2017 at 02:27:58PM +0100, Harry van Haaren wrote:
> This commit zeros out the elf_info struct at startup of the
> pmdinfogen code. If it is not zeroed, later in the code gcc
> produces "may be unused" prints. Clang does not report any
> issue.
>
> This issue is only observed when compiling pmdinfogen as an
> optimized build, hence this warning is not disabled in the
> existing Makefile.
>
> This commit enables a simplification in the meson build
> system, removing the requirement for "-Wno-maybe-uninitialized".
>
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] buildtools: zero elf info variable in pmdinfogen
2017-09-05 14:36 ` Bruce Richardson
@ 2017-09-14 12:21 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-09-14 12:21 UTC (permalink / raw)
To: Harry van Haaren; +Cc: dev, Bruce Richardson
05/09/2017 16:36, Bruce Richardson:
> On Tue, Sep 05, 2017 at 02:27:58PM +0100, Harry van Haaren wrote:
> > This commit zeros out the elf_info struct at startup of the
> > pmdinfogen code. If it is not zeroed, later in the code gcc
> > produces "may be unused" prints. Clang does not report any
> > issue.
> >
> > This issue is only observed when compiling pmdinfogen as an
> > optimized build, hence this warning is not disabled in the
> > existing Makefile.
> >
> > This commit enables a simplification in the meson build
> > system, removing the requirement for "-Wno-maybe-uninitialized".
> >
> > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> >
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-14 12:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 13:03 [dpdk-dev] [PATCH] buildtools: zero elf info variable in pmdinfogen Harry van Haaren
2017-09-05 13:18 ` Bruce Richardson
2017-09-05 13:27 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
2017-09-05 14:36 ` Bruce Richardson
2017-09-14 12:21 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).