Skip to content

Commit c562746

Browse files
nathanchanceickle
authored andcommitted
drm/i915: Disable -Wuninitialized
This warning is disabled by default in scripts/Makefile.extrawarn when W= is not provided but this Makefile adds -Wall after this warning is disabled so it shows up in the build when it shouldn't: In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895: drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error: variable 'wq' is uninitialized when used within its own initialization [-Werror,-Wuninitialized] DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq); ^~ ./include/linux/wait.h:74:63: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK' struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) ~~~~ ^~~~ ./include/linux/wait.h:72:33: note: expanded from macro '__WAIT_QUEUE_HEAD_INIT_ONSTACK' ({ init_waitqueue_head(&name); name; }) ^~~~ 1 error generated. Explicitly disable the warning like commit 46e2068 ("drm/i915: Disable some extra clang warnings"). Link: ClangBuiltLinux#220 Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190126071122.24557-1-natechancellor@gmail.com
1 parent 29214e8 commit c562746

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/i915/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
2222
subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
2323
subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
2424
subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
25+
subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
2526
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
2627

2728
# Fine grained warnings disable

0 commit comments

Comments
 (0)