From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 1/3] drm/i915: copy-paste the extra warnings from scripts/Makefile.extrawarn
Date: Thu, 8 Jun 2023 14:22:31 +0300 [thread overview]
Message-ID: <20230608112233.771453-1-jani.nikula@intel.com> (raw)
We enable a lot more compiler warnings than the kernel defaults. A lot
of them are comparable with the W=1 warnings (and warning disables!) in
scripts/Makefile.extrawarn. Copy-paste them with
s/KBUILD_CFLAGS/subdir-ccflags-y/ to make it easier to compare. Some of
them overlap with the -Wall we also add, but it doesn't really matter.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/Makefile | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 789dce9e2608..690308dc7047 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -12,15 +12,30 @@
# Note the danger in using -Wall -Wextra is that when CI updates gcc we
# will most likely get a sudden build breakage... Hopefully we will fix
# new warnings before CI updates!
-subdir-ccflags-y := -Wall -Wextra
-subdir-ccflags-y += -Wno-format-security
-subdir-ccflags-y += -Wno-unused-parameter
-subdir-ccflags-y += -Wno-type-limits
+subdir-ccflags-y := -Wall
+
+# begin copy-paste W=1 warnings from scripts/Makefile.extrawarn
+subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
+subdir-ccflags-y += -Wmissing-declarations
+subdir-ccflags-y += -Wmissing-format-attribute
+subdir-ccflags-y += -Wmissing-prototypes
+subdir-ccflags-y += -Wold-style-definition
+subdir-ccflags-y += -Wmissing-include-dirs
+subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
+subdir-ccflags-y += $(call cc-option, -Wunused-const-variable)
+subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned)
+subdir-ccflags-y += $(call cc-option, -Wstringop-truncation)
+# The following turn off the warnings enabled by -Wextra
subdir-ccflags-y += -Wno-missing-field-initializers
subdir-ccflags-y += -Wno-sign-compare
+subdir-ccflags-y += -Wno-type-limits
subdir-ccflags-y += -Wno-shift-negative-value
-subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
+# end copy-paste
+
+# The following turn off the warnings enabled by -Wall
+subdir-ccflags-y += -Wno-format-security
subdir-ccflags-y += $(call cc-disable-warning, frame-address)
+
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
subdir-ccflags-y += -I$(srctree)/$(src)
--
2.39.2
next reply other threads:[~2023-06-08 11:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 11:22 Jani Nikula [this message]
2023-06-08 11:22 ` [Intel-gfx] [PATCH 2/3] drm/i915: fix Makefile sort and indent Jani Nikula
2023-06-08 11:22 ` [Intel-gfx] [PATCH 3/3] drm/i915: move Makefile display debugfs files next to display Jani Nikula
2023-06-08 14:31 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915: copy-paste the extra warnings from scripts/Makefile.extrawarn Patchwork
2023-06-08 14:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-06-09 17:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230608112233.771453-1-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox