Skip to content

Commit d79d911

Browse files
authored
Merge pull request #7798 from m-kuhn/enableTravisWarnings
Re-enable travis checks for build warnings
2 parents 4ce10fc + 351eb57 commit d79d911

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.ci/travis/linux/docker-build-test.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ cmake \
5656
-DWITH_SERVER=ON \
5757
-DDISABLE_DEPRECATED=ON \
5858
-DPYTHON_TEST_WRAPPER="timeout -sSIGSEGV 55s"\
59-
-DCXX_EXTRA_FLAGS="${CLANG_WARNINGS}" ..
59+
-DCXX_EXTRA_FLAGS="${CLANG_WARNINGS}" \
60+
-DWERROR=TRUE \
61+
..
6062
echo "travis_fold:end:cmake"
6163

6264
#######

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,10 @@ IF (PEDANTIC)
471471
ELSE (MSVC)
472472
# add warnings via flags (not as definitions as on Mac -Wall can not be overridden per language )
473473
SET(_warnings "-Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing")
474+
SET(WERROR FALSE CACHE BOOL "Treat build warnings as errors.")
475+
IF (WERROR)
476+
SET(_warnings "${_warnings} -Werror")
477+
ENDIF(WERROR)
474478
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_warnings}")
475479
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_warnings}")
476480

src/server/qgsservercachefilter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include <QDomDocument>
2323

2424
QgsServerCacheFilter::QgsServerCacheFilter( const QgsServerInterface *serverInterface )
25-
: mServerInterface( serverInterface )
2625
{
26+
Q_UNUSED( serverInterface );
2727
}
2828

2929
QByteArray QgsServerCacheFilter::getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const

src/server/qgsservercachefilter.h

-5
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ class SERVER_EXPORT QgsServerCacheFilter
123123
*/
124124
virtual bool deleteCachedImages( const QgsProject *project ) const;
125125

126-
private:
127-
128-
//! The server interface
129-
const QgsServerInterface *mServerInterface = nullptr;
130-
131126
};
132127

133128
//! The registry definition

0 commit comments

Comments
 (0)