diff --git a/libbitdht/src/libbitdht.pro b/libbitdht/src/libbitdht.pro index ab53768a5..2e0013b36 100644 --- a/libbitdht/src/libbitdht.pro +++ b/libbitdht/src/libbitdht.pro @@ -28,11 +28,7 @@ DESTDIR = lib !include("use_libbitdht.pri"):error("Including") -QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG - -# treat warnings as error for better removing -#QMAKE_CFLAGS += -Werror -#QMAKE_CXXFLAGS += -Werror +QMAKE_CXXFLAGS *= -DBE_DEBUG ################################# Linux ########################################## linux-* { @@ -84,10 +80,6 @@ win32 { # These have been replaced by _WIN32 && __MINGW32__ #DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW - # Switch on extra warnings - QMAKE_CFLAGS += -Wextra - QMAKE_CXXFLAGS += -Wextra - # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE += -O0 diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index 001c981bc..6ff6fe97b 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -19,10 +19,6 @@ DESTDIR = lib QMAKE_CXXFLAGS += -fPIC -# treat warnings as error for better removing -#QMAKE_CFLAGS += -Werror -#QMAKE_CXXFLAGS += -Werror - ## Uncomment to enable Unfinished Services. #CONFIG += wikipoos #CONFIG += gxsthewire @@ -169,7 +165,7 @@ HEADERS += $$PUBLIC_HEADERS linux-* { CONFIG += link_pkgconfig - QMAKE_CXXFLAGS *= -Wall -D_FILE_OFFSET_BITS=64 + QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 QMAKE_CC = $${QMAKE_CXX} no_sqlcipher { @@ -250,10 +246,6 @@ win32-g++|win32-clang-g++ { MOC_DIR = temp/moc !libretroshare_shared:DEFINES *= STATICLIB - # Switch on extra warnings - QMAKE_CFLAGS += -Wextra - QMAKE_CXXFLAGS += -Wextra - # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE += -O0 diff --git a/openpgpsdk/src/openpgpsdk.pro b/openpgpsdk/src/openpgpsdk.pro index 66341d0a3..79aeeec2d 100644 --- a/openpgpsdk/src/openpgpsdk.pro +++ b/openpgpsdk/src/openpgpsdk.pro @@ -8,7 +8,7 @@ CONFIG += staticlib DEFINES *= OPENSSL_NO_IDEA -QMAKE_CXXFLAGS *= -Wall -Werror -W +QMAKE_CXXFLAGS *= -Werror -W TARGET = ops DESTDIR = lib diff --git a/plugins/Common/retroshare_plugin.pri b/plugins/Common/retroshare_plugin.pri index db2cd25eb..a3a6c5d8d 100644 --- a/plugins/Common/retroshare_plugin.pri +++ b/plugins/Common/retroshare_plugin.pri @@ -53,10 +53,6 @@ win32 { LIBS += -L"$$OUT_PWD/../../libretroshare/src/lib" -lretroshare } - # Switch on extra warnings - QMAKE_CFLAGS += -Wextra - QMAKE_CXXFLAGS += -Wextra - CONFIG(debug, debug|release) { } else { # Tell linker to use ASLR protection diff --git a/plugins/VOIP/VOIP.pro b/plugins/VOIP/VOIP.pro index 1ec4defa4..fbc5302d0 100644 --- a/plugins/VOIP/VOIP.pro +++ b/plugins/VOIP/VOIP.pro @@ -77,8 +77,6 @@ macx { # ffmpeg (and libavutil: https://github.com/ffms/ffms2/issues/11) QMAKE_CXXFLAGS += -D__STDC_CONSTANT_MACROS -QMAKE_CXXFLAGS *= -Wall - SOURCES = VOIPPlugin.cpp \ gui/VOIPConfigPanel.cpp \ services/p3VOIP.cc \ diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 73787b65a..2c20bec59 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -217,10 +217,6 @@ win32-g++|win32-clang-g++ { CONFIG -= console } - # Switch on extra warnings - QMAKE_CFLAGS += -Wextra - QMAKE_CXXFLAGS += -Wextra - CONFIG(debug, debug|release) { } else { # Tell linker to use ASLR protection diff --git a/retroshare.pri b/retroshare.pri index d5bad4bd2..f71758c8f 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -607,6 +607,18 @@ profiling { QMAKE_LFLAGS *= -pg } +# Enable all warnings +QMAKE_CFLAGS *= -Wall -Wextra +QMAKE_CXXFLAGS *= -Wall -Wextra + +# Disable unwanted warnings +QMAKE_CFLAGS *= -Wno-misleading-indentation -Wno-dangling-else +QMAKE_CXXFLAGS *= -Wno-misleading-indentation -Wno-dangling-else + +# Treat warnings as error for better removing +#QMAKE_CFLAGS += -Werror +#QMAKE_CXXFLAGS += -Werror + ################################################################################ ## Last goes platform specific statements common to all RetroShare subprojects # ################################################################################ diff --git a/tests/librssimulator/librssimulator.pro b/tests/librssimulator/librssimulator.pro index 1f6ded77d..75a73fdd3 100644 --- a/tests/librssimulator/librssimulator.pro +++ b/tests/librssimulator/librssimulator.pro @@ -89,7 +89,7 @@ linux-* { INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk DESTDIR = lib - QMAKE_CXXFLAGS *= -Wall -D_FILE_OFFSET_BITS=64 + QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 QMAKE_CC = $${QMAKE_CXX} SSL_DIR = /usr/include/openssl @@ -172,10 +172,6 @@ win32 { DEFINES *= WINVER=0x0501 DESTDIR = lib - # Switch on extra warnings - QMAKE_CFLAGS += -Wextra - QMAKE_CXXFLAGS += -Wextra - # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE += -O0