drm/i915: Disable some extra clang warnings
Subsystems (2)
PATCH 1/1 drm/i915: Disable some extra clang warnings
Commit 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set warnings to full") enabled extra warnings for i915 to spot possible bugs in new code, and then disabled a subset of these warnings to keep the current code building without warnings (with gcc). Enabling the extra warnings also enabled some additional clang-only warnings, as a result building i915 with clang currently is extremely noisy. For now also disable the clang warnings sign-compare, sometimes-uninitialized, unneeded-internal-declaration and initializer-overrides. If desired they can be re-enabled after the code has been fixed.
warnings to full")
--- drivers/gpu/drm/i915/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/Makefile +4 -0
@@ -17,6 +17,10 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-parameter) subdir-ccflags-y += $(call cc-disable-warning, type-limits) subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers) subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough) +subdir-ccflags-y += $(call cc-disable-warning, sign-compare) +subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized) +subdir-ccflags-y += $(call cc-disable-warning, unneeded-internal-declaration) +subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides) subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror # Fine grained warnings disable
Signature · 6 lines
2.16.2.804.g6dcf76e118-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Disable some extra clang warnings
== Series Details ==
== Series Details ==
Series: drm/i915: Disable some extra clang warnings
URL : https://patchwork.freedesktop.org/series/40145/
State : failure
== Summary ==
Applying: drm/i915: Disable some extra clang warnings
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/Makefile
Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/Makefile
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/Makefile Patch failed at 0001 drm/i915: Disable some extra clang warnings The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 10 lines · Matthias Kaehlcke
Commit
39bf4de89ff7("drm/i915: Add -Wall -Wextra to our build, set warnings to full") enabled extra warnings for i915 to spot possible bugs in new code, and then disabled a subset of these warnings to keep the current code building without warnings (with gcc). Enabling the extra warnings also enabled some additional clang-only warnings, as a result building i915 with clang currently is extremely noisy. For now also disable the clang warnings sign-compare, sometimes-uninitialized, unneeded-internal-declaration and initializer-overrides. If desired they can be re-enabled after the code has been fixed.
Quoted 3 lines
Fixes 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, setwarnings to full")
Signed-off-by Matthias Kaehlcke <[email protected]>
Thanks for the patch, I think it's the right thing to do. I'm afraid it doesn't apply to current code, however. Please rebase on top of drm-tip branch of [1].
drivers/gpu/drm/i915/Makefile subdir-ccflags-y += $(call cc-disable-warning, unused-parameter) · line 19
Quoted 12 lines
--- drivers/gpu/drm/i915/Makefile | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/Makefile +0
-0@@ -17,6 +17,10 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-parameter) subdir-ccflags-y += $(call cc-disable-warning, type-limits) subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers) subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
While at it, please add a comment here noting that the below disables are for Clang.
Thanks,
Jani.
[1] https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel
Quoted 7 lines
drivers/gpu/drm/i915/Makefile +4
-0+subdir-ccflags-y += $(call cc-disable-warning, sign-compare) +subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized) +subdir-ccflags-y += $(call cc-disable-warning, unneeded-internal-declaration) +subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides) subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror # Fine grained warnings disable
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel