Skip to content

Commit 46e2068

Browse files
Matthias Kaehlckeickle
authored andcommitted
drm/i915: Disable some extra clang warnings
Commit 39bf4de ("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. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180501182440.70121-1-mka@chromium.org
1 parent 3a06872 commit 46e2068

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/i915/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ subdir-ccflags-y += $(call cc-disable-warning, type-limits)
1818
subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
1919
subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
2020
subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
21+
# clang warnings
22+
subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
23+
subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
24+
subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
2125
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
2226

2327
# Fine grained warnings disable

0 commit comments

Comments
 (0)