Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] meson: Turn on -Werror
@ 2021-01-30  6:44 Ashutosh Dixit
  2021-01-30  7:23 ` [igt-dev] ✗ GitLab.Pipeline: warning for meson: Turn on -Werror (rev2) Patchwork
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Ashutosh Dixit @ 2021-01-30  6:44 UTC (permalink / raw)
  To: igt-dev

We can choose which compile warnings to enable, but once they are enabled
treat all warnings as error. This enforces stricter checks against compile
warnings creeping in.

v2: Fix redefinition warning errors from i915/gem_userptr_blits

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 meson.build                    | 28 +++++++++++++++-------------
 tests/i915/gem_userptr_blits.c |  2 --
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/meson.build b/meson.build
index f4ee14f14a..3f3693f99d 100644
--- a/meson.build
+++ b/meson.build
@@ -51,19 +51,21 @@ cc_args = [
 	'-Wno-unused-parameter',
 	'-Wno-unused-result',
 
-	'-Werror=address',
-	'-Werror=array-bounds',
-	'-Werror=implicit',
-	'-Werror=init-self',
-	'-Werror=int-to-pointer-cast',
-	'-Werror=main',
-	'-Werror=missing-braces',
-	'-Werror=nonnull',
-	'-Werror=pointer-to-int-cast',
-	'-Werror=return-type',
-	'-Werror=sequence-point',
-	'-Werror=trigraphs',
-	'-Werror=write-strings',
+	'-Waddress',
+	'-Warray-bounds',
+	'-Wimplicit',
+	'-Winit-self',
+	'-Wint-to-pointer-cast',
+	'-Wmain',
+	'-Wmissing-braces',
+	'-Wnonnull',
+	'-Wpointer-to-int-cast',
+	'-Wreturn-type',
+	'-Wsequence-point',
+	'-Wtrigraphs',
+	'-Wwrite-strings',
+
+	'-Werror',
 # Disable the memory allocating builtins as they may cause unexpected behavior
 # with our framework. They *may* get optimized out in favor of a register or
 # stack variable, making them effectively local. Local variables do not play
diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c
index 2f3954c5d6..31bca3b78f 100644
--- a/tests/i915/gem_userptr_blits.c
+++ b/tests/i915/gem_userptr_blits.c
@@ -55,8 +55,6 @@
 #include <pthread.h>
 #include <time.h>
 
-#include <linux/memfd.h>
-
 #include "drm.h"
 #include "i915_drm.h"
 
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t] meson: Turn on -Werror
@ 2021-01-30  4:17 Ashutosh Dixit
  0 siblings, 0 replies; 13+ messages in thread
From: Ashutosh Dixit @ 2021-01-30  4:17 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

We can choose which compile warnings to enable, but once they are enabled
treat all warnings as error. This enforces stricter checks against compile
warnings creeping in.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 meson.build | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/meson.build b/meson.build
index f4ee14f14a..3f3693f99d 100644
--- a/meson.build
+++ b/meson.build
@@ -51,19 +51,21 @@ cc_args = [
 	'-Wno-unused-parameter',
 	'-Wno-unused-result',
 
-	'-Werror=address',
-	'-Werror=array-bounds',
-	'-Werror=implicit',
-	'-Werror=init-self',
-	'-Werror=int-to-pointer-cast',
-	'-Werror=main',
-	'-Werror=missing-braces',
-	'-Werror=nonnull',
-	'-Werror=pointer-to-int-cast',
-	'-Werror=return-type',
-	'-Werror=sequence-point',
-	'-Werror=trigraphs',
-	'-Werror=write-strings',
+	'-Waddress',
+	'-Warray-bounds',
+	'-Wimplicit',
+	'-Winit-self',
+	'-Wint-to-pointer-cast',
+	'-Wmain',
+	'-Wmissing-braces',
+	'-Wnonnull',
+	'-Wpointer-to-int-cast',
+	'-Wreturn-type',
+	'-Wsequence-point',
+	'-Wtrigraphs',
+	'-Wwrite-strings',
+
+	'-Werror',
 # Disable the memory allocating builtins as they may cause unexpected behavior
 # with our framework. They *may* get optimized out in favor of a register or
 # stack variable, making them effectively local. Local variables do not play
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2021-01-30 14:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-30  6:44 [igt-dev] [PATCH i-g-t] meson: Turn on -Werror Ashutosh Dixit
2021-01-30  7:23 ` [igt-dev] ✗ GitLab.Pipeline: warning for meson: Turn on -Werror (rev2) Patchwork
2021-01-30  7:45 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2021-01-30  9:19 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-01-30 12:11 ` [igt-dev] [PATCH i-g-t] meson: Turn on -Werror Chris Wilson
2021-01-30 12:22 ` [igt-dev] ✗ Fi.CI.BUILD: failure for meson: Turn on -Werror (rev3) Patchwork
2021-01-30 12:34 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-01-30 12:46   ` =?unknown-8bit?b?4pyX?= " Chris Wilson
2021-01-30 12:42 ` [igt-dev] [PATCH i-g-t] meson: Turn on -Werror Chris Wilson
2021-01-30 13:05 ` [igt-dev] ✗ GitLab.Pipeline: warning for meson: Turn on -Werror (rev4) Patchwork
2021-01-30 13:22 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2021-01-30 14:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2021-01-30  4:17 [igt-dev] [PATCH i-g-t] meson: Turn on -Werror Ashutosh Dixit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox