xref: /OK3568_Linux_fs/buildroot/package/rpi-userland/0003-Disable-Werror-everywhere.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From cc9ac86bcff79697d354cc51d3a984fd0f362868 Mon Sep 17 00:00:00 2001
2From: Peter Seiderer <ps.report@gmx.net>
3Date: Thu, 22 Sep 2016 22:59:11 +0200
4Subject: [PATCH] Disable Werror everywhere
5
6With gcc-5.1, some constructs that were previously accepted (but wrong)
7are now considered warnings, and thus -Werror makes them errors.
8
9Ditch -Werror altoghether.
10
11Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
12
13[Rebased for rpi-userland-a1b89e91f393c7134b4cdc36431f863bb3333163]
14Signed-off-by: Peter Seiderer <ps.report@gmx.net>
15
16[Rebased for rpi-userland-8f0abfb07b96e7ee85f46e59d895014ec5e25f5e]
17Signed-off-by: Peter Seiderer <ps.report@gmx.net>
18
19[Rebased for rpi-userland-5070cb7fc150fc98f1ed64a7739c3356970d9f76]
20Signed-off-by: Peter Seiderer <ps.report@gmx.net>
21---
22 host_applications/android/apps/vidtex/CMakeLists.txt | 2 +-
23 host_applications/linux/apps/gencmd/CMakeLists.txt   | 2 +-
24 host_applications/linux/apps/raspicam/CMakeLists.txt | 2 +-
25 host_applications/linux/apps/smem/CMakeLists.txt     | 2 +-
26 host_applications/linux/libs/bcm_host/CMakeLists.txt | 2 +-
27 host_applications/linux/libs/sm/CMakeLists.txt       | 2 +-
28 interface/mmal/CMakeLists.txt                        | 2 +-
29 interface/vcos/CMakeLists.txt                        | 2 +-
30 interface/vcos/pthreads/CMakeLists.txt               | 2 +-
31 interface/vmcs_host/CMakeLists.txt                   | 2 +-
32 10 files changed, 10 insertions(+), 10 deletions(-)
33
34diff --git a/host_applications/android/apps/vidtex/CMakeLists.txt b/host_applications/android/apps/vidtex/CMakeLists.txt
35index 6d66d69..06a3192 100644
36--- a/host_applications/android/apps/vidtex/CMakeLists.txt
37+++ b/host_applications/android/apps/vidtex/CMakeLists.txt
38@@ -1,6 +1,6 @@
39 cmake_minimum_required(VERSION 2.8)
40
41-SET(COMPILE_DEFINITIONS -Werror -Wall)
42+SET(COMPILE_DEFINITIONS -Wall)
43
44 # Set --no-as-needed to stop the linker discarding mmal_vc_client
45 # as it can't see that the constructor registers a load of functionality
46diff --git a/host_applications/linux/apps/gencmd/CMakeLists.txt b/host_applications/linux/apps/gencmd/CMakeLists.txt
47index f95d1a1..034bf20 100644
48--- a/host_applications/linux/apps/gencmd/CMakeLists.txt
49+++ b/host_applications/linux/apps/gencmd/CMakeLists.txt
50@@ -4,7 +4,7 @@ if (WIN32)
51    set(VCOS_PLATFORM win32)
52 else ()
53    set(VCOS_PLATFORM pthreads)
54-   add_definitions(-Wall -Werror)
55+   add_definitions(-Wall )
56 endif ()
57
58 include_directories( ../../../..
59diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt
60index f7db21e..b94bdc3 100644
61--- a/host_applications/linux/apps/raspicam/CMakeLists.txt
62+++ b/host_applications/linux/apps/raspicam/CMakeLists.txt
63@@ -1,7 +1,7 @@
64
65 # raspistill/raspivid/raspiyuv
66
67-SET(COMPILE_DEFINITIONS -Werror)
68+SET(COMPILE_DEFINITIONS )
69
70 # Set --no-as-needed to stop the linker discarding mmal_vc_client
71 # as it can't see that the constructor registers a load of functionality
72diff --git a/host_applications/linux/apps/smem/CMakeLists.txt b/host_applications/linux/apps/smem/CMakeLists.txt
73index 0fa8328..f0d1e77 100644
74--- a/host_applications/linux/apps/smem/CMakeLists.txt
75+++ b/host_applications/linux/apps/smem/CMakeLists.txt
76@@ -4,7 +4,7 @@ get_filename_component (VIDEOCORE_ROOT ../../../.. ABSOLUTE)
77 include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake)
78
79 if (NOT WIN32)
80-   add_definitions(-Wall -Werror)
81+   add_definitions(-Wall )
82 endif ()
83
84 include_directories (
85diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
86index 2154e53..c23779b 100644
87--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
88+++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
89@@ -3,7 +3,7 @@ if (WIN32)
90    set(VCOS_PLATFORM win32)
91 else ()
92    set(VCOS_PLATFORM pthreads)
93-   add_definitions(-Wall -Werror)
94+   add_definitions(-Wall )
95 endif ()
96
97 # set this as we want all the source of vchostif to be available in libbcm_host
98diff --git a/host_applications/linux/libs/sm/CMakeLists.txt b/host_applications/linux/libs/sm/CMakeLists.txt
99index 5ce5aca..02aea7c 100644
100--- a/host_applications/linux/libs/sm/CMakeLists.txt
101+++ b/host_applications/linux/libs/sm/CMakeLists.txt
102@@ -3,7 +3,7 @@ if (WIN32)
103    set(VCOS_PLATFORM win32)
104 else ()
105    set(VCOS_PLATFORM pthreads)
106-   add_definitions(-Wall -Werror)
107+   add_definitions(-Wall )
108 endif ()
109
110 include_directories( ../../../..
111diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt
112index 46f149d..06273dc 100644
113--- a/interface/mmal/CMakeLists.txt
114+++ b/interface/mmal/CMakeLists.txt
115@@ -3,7 +3,7 @@ if (NOT DEFINED LIBRARY_TYPE)
116 set(LIBRARY_TYPE SHARED)
117 endif (NOT DEFINED LIBRARY_TYPE)
118
119-add_definitions(-Wall -Werror)
120+add_definitions(-Wall )
121
122 add_library(mmal SHARED util/mmal_util.c)
123
124diff --git a/interface/vcos/CMakeLists.txt b/interface/vcos/CMakeLists.txt
125index 23a8d72..988b104 100644
126--- a/interface/vcos/CMakeLists.txt
127+++ b/interface/vcos/CMakeLists.txt
128@@ -43,7 +43,7 @@ foreach (header ${HEADERS})
129 endforeach ()
130
131 if (CMAKE_COMPILER_IS_GNUCC)
132-   add_definitions (-ggdb -Werror -Wall)
133+   add_definitions (-ggdb  -Wall)
134 endif ()
135
136 if (CMAKE_COMPILER_2005)
137diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt
138index 1d81ca3..b35cd8e 100644
139--- a/interface/vcos/pthreads/CMakeLists.txt
140+++ b/interface/vcos/pthreads/CMakeLists.txt
141@@ -1,7 +1,7 @@
142 # MSVC5 does not fully support C99, enabling declaration-after-statement
143 # warnings allows a common MSVC5 build error to be detected in Linux builds.
144 if (CMAKE_COMPILER_IS_GNUCC)
145-   set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wdeclaration-after-statement")
146+   set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall  -Wdeclaration-after-statement")
147    add_definitions (-D_GNU_SOURCE)
148 endif ()
149
150diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
151index a157db1..dc384ca 100755
152--- a/interface/vmcs_host/CMakeLists.txt
153+++ b/interface/vmcs_host/CMakeLists.txt
154@@ -2,7 +2,7 @@
155 # interface/vmcs_host
156
157 # not working in release build
158-# add_definitions(-Werror)
159+# add_definitions()
160
161 # vc_vchi_gencmd.c has a type-punning problem in vc_gencmd_read_response
162 add_definitions(-fno-strict-aliasing)
163--
1642.23.0
165
166