Linux-CXL Archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings
@ 2024-01-16 21:17 Dan Williams
  2024-01-17  5:24 ` Alison Schofield
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Williams @ 2024-01-16 21:17 UTC (permalink / raw
  To: linux-cxl, nvdimm

Prevent warnings of the form:

tools/testing/nvdimm/config_check.c:4:6: error: no previous prototype
for ‘check’ [-Werror=missing-prototypes]

...by locally disabling some warnings.

It turns out that:

Commit 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally")

...in addition to expanding in-tree coverage, also impacts out-of-tree
module builds like those in tools/testing/nvdimm/.

Filter out the warning options on unit test code that does not effect
mainline builds.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 tools/testing/nvdimm/Kbuild |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild
index 8153251ea389..91a3627f301a 100644
--- a/tools/testing/nvdimm/Kbuild
+++ b/tools/testing/nvdimm/Kbuild
@@ -82,4 +82,6 @@ libnvdimm-$(CONFIG_NVDIMM_KEYS) += $(NVDIMM_SRC)/security.o
 libnvdimm-y += libnvdimm_test.o
 libnvdimm-y += config_check.o
 
+KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations, $(KBUILD_CFLAGS))
+
 obj-m += test/


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings
  2024-01-16 21:17 [PATCH] tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings Dan Williams
@ 2024-01-17  5:24 ` Alison Schofield
  0 siblings, 0 replies; 2+ messages in thread
From: Alison Schofield @ 2024-01-17  5:24 UTC (permalink / raw
  To: Dan Williams; +Cc: linux-cxl, nvdimm

On Tue, Jan 16, 2024 at 01:17:23PM -0800, Dan Williams wrote:
> Prevent warnings of the form:
> 
> tools/testing/nvdimm/config_check.c:4:6: error: no previous prototype
> for ‘check’ [-Werror=missing-prototypes]
> 
> ...by locally disabling some warnings.
> 
> It turns out that:
> 
> Commit 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally")
> 
> ...in addition to expanding in-tree coverage, also impacts out-of-tree
> module builds like those in tools/testing/nvdimm/.
> 
> Filter out the warning options on unit test code that does not effect
> mainline builds.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Alison Schofield <alison.schofield@intel.com>

> ---
>  tools/testing/nvdimm/Kbuild |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild
> index 8153251ea389..91a3627f301a 100644
> --- a/tools/testing/nvdimm/Kbuild
> +++ b/tools/testing/nvdimm/Kbuild
> @@ -82,4 +82,6 @@ libnvdimm-$(CONFIG_NVDIMM_KEYS) += $(NVDIMM_SRC)/security.o
>  libnvdimm-y += libnvdimm_test.o
>  libnvdimm-y += config_check.o
>  
> +KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations, $(KBUILD_CFLAGS))
> +
>  obj-m += test/
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-17  5:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 21:17 [PATCH] tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings Dan Williams
2024-01-17  5:24 ` Alison Schofield

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 read-only IMAP folder(s) and NNTP newsgroup(s).