All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/04 libdrm] The rocky road to building with -Wextra
@ 2015-02-23 13:57 Emil Velikov
  2015-02-23 13:57 ` [PATCH libdrm 1/4] autotools: add AM_DISTCHECK_CONFIGURE_FLAGS Emil Velikov
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Emil Velikov @ 2015-02-23 13:57 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Hi all,

A few small patches, that handle the initial step of building the whole 
of libdrm with WARN_CFLAGS (-Wall -Wextra and friends).

The first patch makes sure we build everything at make distcheck time, 
followed by a couple of warnings-turned-errors, and finally adding the 
cflags everywhere in the project.

Individual fixes for the 66 warnings will follow up in due time :-)

Thanks
Emil

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH libdrm 1/4] autotools: add AM_DISTCHECK_CONFIGURE_FLAGS
  2015-02-23 13:57 [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
@ 2015-02-23 13:57 ` Emil Velikov
  2015-02-23 13:57 ` [PATCH libdrm 2/4] exynos_fimg2d_test: fix implicit funciton declaration errors Emil Velikov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Emil Velikov @ 2015-02-23 13:57 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

To make sure that the release/distribution tarball is not broken for all
the targets. Currently the experimental APIs are disabled by default
amongst others.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 Makefile.am | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 3cb516c..062feb4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,22 @@ include Makefile.sources
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
+AM_DISTCHECK_CONFIGURE_FLAGS = \
+	--enable-udev \
+	--enable-libkms \
+	--enable-intel \
+	--enable-radeon \
+	--enable-nouveau \
+	--enable-vmwgfx \
+	--enable-omap-experimental-api \
+	--enable-exynos-experimental-api \
+	--enable-freedreno \
+	--enable-freedreno-kgsl\
+	--enable-tegra-experimental-api \
+	--enable-install-test-programs \
+	--enable-cairo-tests \
+	--enable-manpages
+
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm.pc
 
-- 
2.3.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH libdrm 2/4] exynos_fimg2d_test: fix implicit funciton declaration errors
  2015-02-23 13:57 [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
  2015-02-23 13:57 ` [PATCH libdrm 1/4] autotools: add AM_DISTCHECK_CONFIGURE_FLAGS Emil Velikov
@ 2015-02-23 13:57 ` Emil Velikov
  2015-02-23 13:57 ` [PATCH libdrm 3/4] tests: " Emil Velikov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Emil Velikov @ 2015-02-23 13:57 UTC (permalink / raw)
  To: dri-devel; +Cc: Kyungmin Park, emil.l.velikov

As one adds WARN_CFLAGS to the build the compiler throws a couple of
lovely error messages. Add the relevant includes to fix them.

  error: implicit declaration of function ‘time’
  error: implicit declaration of function ‘getopt’

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 tests/exynos/exynos_fimg2d_test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
index c6bd558..f141964 100644
--- a/tests/exynos/exynos_fimg2d_test.c
+++ b/tests/exynos/exynos_fimg2d_test.c
@@ -18,6 +18,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
+#include <time.h>
+#include <unistd.h>
 
 #include <sys/mman.h>
 #include <linux/stddef.h>
-- 
2.3.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH libdrm 3/4] tests: fix implicit funciton declaration errors
  2015-02-23 13:57 [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
  2015-02-23 13:57 ` [PATCH libdrm 1/4] autotools: add AM_DISTCHECK_CONFIGURE_FLAGS Emil Velikov
  2015-02-23 13:57 ` [PATCH libdrm 2/4] exynos_fimg2d_test: fix implicit funciton declaration errors Emil Velikov
@ 2015-02-23 13:57 ` Emil Velikov
  2015-02-23 13:57 ` [PATCH libdrm 4/4] autotools: add WARN_CFLAGS to all targets Emil Velikov
  2015-02-25 15:25 ` [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
  4 siblings, 0 replies; 7+ messages in thread
From: Emil Velikov @ 2015-02-23 13:57 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

ioctl() and strcmp() were used without the relevent header being
included.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 tests/auth.c         | 1 +
 tests/getclient.c    | 1 +
 tests/getstats.c     | 1 +
 tests/lock.c         | 1 +
 tests/name_from_fd.c | 1 +
 tests/setversion.c   | 1 +
 tests/updatedraw.c   | 1 +
 7 files changed, 7 insertions(+)

diff --git a/tests/auth.c b/tests/auth.c
index 9b6fca9..9147b11 100644
--- a/tests/auth.c
+++ b/tests/auth.c
@@ -26,6 +26,7 @@
  */
 
 #include <limits.h>
+#include <sys/ioctl.h>
 #include "drmtest.h"
 
 enum auth_event {
diff --git a/tests/getclient.c b/tests/getclient.c
index 349c16e..481ce11 100644
--- a/tests/getclient.c
+++ b/tests/getclient.c
@@ -26,6 +26,7 @@
  */
 
 #include <limits.h>
+#include <sys/ioctl.h>
 #include "drmtest.h"
 
 /**
diff --git a/tests/getstats.c b/tests/getstats.c
index bd55b12..8d40d0b 100644
--- a/tests/getstats.c
+++ b/tests/getstats.c
@@ -26,6 +26,7 @@
  */
 
 #include <limits.h>
+#include <sys/ioctl.h>
 #include "drmtest.h"
 
 /**
diff --git a/tests/lock.c b/tests/lock.c
index 86caa28..365681b 100644
--- a/tests/lock.c
+++ b/tests/lock.c
@@ -30,6 +30,7 @@
  */
 
 #include <limits.h>
+#include <sys/ioctl.h>
 #include "drmtest.h"
 
 enum auth_event {
diff --git a/tests/name_from_fd.c b/tests/name_from_fd.c
index 330c8ff..e3db413 100644
--- a/tests/name_from_fd.c
+++ b/tests/name_from_fd.c
@@ -28,6 +28,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <limits.h>
+#include <string.h>
 #include "drmtest.h"
 
 /**
diff --git a/tests/setversion.c b/tests/setversion.c
index 5a5d01c..2f7b529 100644
--- a/tests/setversion.c
+++ b/tests/setversion.c
@@ -27,6 +27,7 @@
 
 #include <limits.h>
 #include <string.h>
+#include <sys/ioctl.h>
 #include "drmtest.h"
 
 /**
diff --git a/tests/updatedraw.c b/tests/updatedraw.c
index a61eb15..8e0b94b 100644
--- a/tests/updatedraw.c
+++ b/tests/updatedraw.c
@@ -25,6 +25,7 @@
  *
  */
 
+#include <sys/ioctl.h>
 #include "drmtest.h"
 
 static void
-- 
2.3.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH libdrm 4/4] autotools: add WARN_CFLAGS to all targets
  2015-02-23 13:57 [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
                   ` (2 preceding siblings ...)
  2015-02-23 13:57 ` [PATCH libdrm 3/4] tests: " Emil Velikov
@ 2015-02-23 13:57 ` Emil Velikov
  2015-02-25 15:25 ` [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
  4 siblings, 0 replies; 7+ messages in thread
From: Emil Velikov @ 2015-02-23 13:57 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

... minus test/ttmtest. The latter is not really hooked up with the
actual build.

This will give us 66 warnings on a distribution build of which
 - 12 -Wunused-variable
 - 11 -Wunused-function
 - 19 -Wmissing-prototypes
and a few -Wswitch-enum, -Wtype-limits etc.

Adding the CFLAGS gives some exposure to these so that we can fix them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 Makefile.am                 | 1 +
 tests/Makefile.am           | 3 ++-
 tests/exynos/Makefile.am    | 1 +
 tests/kmstest/Makefile.am   | 1 +
 tests/modeprint/Makefile.am | 1 +
 tests/proptest/Makefile.am  | 1 +
 tests/radeon/Makefile.am    | 1 +
 tests/tegra/Makefile.am     | 2 +-
 tests/vbltest/Makefile.am   | 2 ++
 9 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 062feb4..9514cc5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,6 +82,7 @@ libdrm_la_LIBADD = @CLOCK_LIB@
 
 libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm
 AM_CFLAGS = \
+	$(WARN_CFLAGS) \
 	$(VALGRIND_CFLAGS)
 
 libdrm_la_SOURCES = $(LIBDRM_FILES)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 37b8d3a..f989d8e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,7 @@
 NULL:=#
 
-AM_CPPFLAGS = \
+AM_CFLAGS = \
+	$(WARN_CFLAGS)\
 	-I $(top_srcdir)/include/drm \
 	-I $(top_srcdir)
 
diff --git a/tests/exynos/Makefile.am b/tests/exynos/Makefile.am
index 92de4e4..b21d016 100644
--- a/tests/exynos/Makefile.am
+++ b/tests/exynos/Makefile.am
@@ -1,4 +1,5 @@
 AM_CFLAGS = \
+	$(WARN_CFLAGS)\
 	-I $(top_srcdir)/include/drm \
 	-I $(top_srcdir)/libkms/ \
 	-I $(top_srcdir)/exynos \
diff --git a/tests/kmstest/Makefile.am b/tests/kmstest/Makefile.am
index 7903a26..fd21e61 100644
--- a/tests/kmstest/Makefile.am
+++ b/tests/kmstest/Makefile.am
@@ -1,4 +1,5 @@
 AM_CFLAGS = \
+	$(WARN_CFLAGS)\
 	-I$(top_srcdir)/include/drm \
 	-I$(top_srcdir)/libkms/ \
 	-I$(top_srcdir)
diff --git a/tests/modeprint/Makefile.am b/tests/modeprint/Makefile.am
index 6420ef3..895805f 100644
--- a/tests/modeprint/Makefile.am
+++ b/tests/modeprint/Makefile.am
@@ -1,4 +1,5 @@
 AM_CFLAGS = \
+	$(WARN_CFLAGS)\
 	-I$(top_srcdir)/include/drm \
 	-I$(top_srcdir)
 
diff --git a/tests/proptest/Makefile.am b/tests/proptest/Makefile.am
index f81a3c0..48a84c1 100644
--- a/tests/proptest/Makefile.am
+++ b/tests/proptest/Makefile.am
@@ -1,4 +1,5 @@
 AM_CFLAGS = \
+	$(WARN_CFLAGS)\
 	-I$(top_srcdir)/include/drm \
 	-I$(top_srcdir)
 
diff --git a/tests/radeon/Makefile.am b/tests/radeon/Makefile.am
index 1775669..d18620d 100644
--- a/tests/radeon/Makefile.am
+++ b/tests/radeon/Makefile.am
@@ -1,4 +1,5 @@
 AM_CFLAGS = \
+	$(WARN_CFLAGS)\
 	-I $(top_srcdir)/include/drm \
 	-I $(top_srcdir)
 
diff --git a/tests/tegra/Makefile.am b/tests/tegra/Makefile.am
index ca63d92..8e625c8 100644
--- a/tests/tegra/Makefile.am
+++ b/tests/tegra/Makefile.am
@@ -3,7 +3,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/tegra \
 	-I$(top_srcdir)
 
-AM_CFLAGS = -Wall -Werror
+AM_CFLAGS = $(WARN_CFLAGS)
 
 LDADD = \
 	../../tegra/libdrm_tegra.la \
diff --git a/tests/vbltest/Makefile.am b/tests/vbltest/Makefile.am
index 34a35e7..4d87887 100644
--- a/tests/vbltest/Makefile.am
+++ b/tests/vbltest/Makefile.am
@@ -1,6 +1,8 @@
 AM_CFLAGS = \
+	$(WARN_CFLAGS)\
 	-I$(top_srcdir)/include/drm \
 	-I$(top_srcdir)
+
 if HAVE_INSTALL_TESTS
 bin_PROGRAMS = \
 	vbltest
-- 
2.3.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 00/04 libdrm] The rocky road to building with -Wextra
  2015-02-23 13:57 [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
                   ` (3 preceding siblings ...)
  2015-02-23 13:57 ` [PATCH libdrm 4/4] autotools: add WARN_CFLAGS to all targets Emil Velikov
@ 2015-02-25 15:25 ` Emil Velikov
  2015-02-25 17:02   ` Jan Vesely
  4 siblings, 1 reply; 7+ messages in thread
From: Emil Velikov @ 2015-02-25 15:25 UTC (permalink / raw)
  To: ML dri-devel, Jan Vesely; +Cc: Emil Velikov

On 23 February 2015 at 13:57, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> Hi all,
>
> A few small patches, that handle the initial step of building the whole
> of libdrm with WARN_CFLAGS (-Wall -Wextra and friends).
>
> The first patch makes sure we build everything at make distcheck time,
> followed by a couple of warnings-turned-errors, and finally adding the
> cflags everywhere in the project.
>
> Individual fixes for the 66 warnings will follow up in due time :-)
>
Hi Jan,

Slightly forgot that you're not subscribed to the list.
Considering your earlier work on this can you take a look at the series please.

This lays the groundwork, and a later one [1] nukes some of the warnings.

Thank
Emil

[1] http://lists.freedesktop.org/archives/dri-devel/2015-February/077976.html
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 00/04 libdrm] The rocky road to building with -Wextra
  2015-02-25 15:25 ` [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
@ 2015-02-25 17:02   ` Jan Vesely
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Vesely @ 2015-02-25 17:02 UTC (permalink / raw)
  To: Emil Velikov; +Cc: ML dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1216 bytes --]

On Wed, 2015-02-25 at 15:25 +0000, Emil Velikov wrote:
> On 23 February 2015 at 13:57, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> > Hi all,
> >
> > A few small patches, that handle the initial step of building the whole
> > of libdrm with WARN_CFLAGS (-Wall -Wextra and friends).
> >
> > The first patch makes sure we build everything at make distcheck time,
> > followed by a couple of warnings-turned-errors, and finally adding the
> > cflags everywhere in the project.
> >
> > Individual fixes for the 66 warnings will follow up in due time :-)
> >
> Hi Jan,
> 
> Slightly forgot that you're not subscribed to the list.
> Considering your earlier work on this can you take a look at the series please.
> 
> This lays the groundwork, and a later one [1] nukes some of the warnings.

Hi,

I'm now subscribed to the list, but I somehow missed the series. The
changes are pretty straightforward. You can add
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>

I'll try to find some time to take a look at the other series too.

jan

> 
> Thank
> Emil
> 
> [1] http://lists.freedesktop.org/archives/dri-devel/2015-February/077976.html

-- 
Jan Vesely <jan.vesely@rutgers.edu>

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2015-02-25 17:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 13:57 [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
2015-02-23 13:57 ` [PATCH libdrm 1/4] autotools: add AM_DISTCHECK_CONFIGURE_FLAGS Emil Velikov
2015-02-23 13:57 ` [PATCH libdrm 2/4] exynos_fimg2d_test: fix implicit funciton declaration errors Emil Velikov
2015-02-23 13:57 ` [PATCH libdrm 3/4] tests: " Emil Velikov
2015-02-23 13:57 ` [PATCH libdrm 4/4] autotools: add WARN_CFLAGS to all targets Emil Velikov
2015-02-25 15:25 ` [PATCH 00/04 libdrm] The rocky road to building with -Wextra Emil Velikov
2015-02-25 17:02   ` Jan Vesely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.