Merge pull request #2545 from thunder2/warnings

Moved compiler flags for warnings to retroshare.pri
This commit is contained in:
csoler 2022-01-08 17:53:06 +01:00 committed by GitHub
commit 068aa7b7ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 34 deletions

View File

@ -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

View File

@ -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

View File

@ -8,7 +8,7 @@ CONFIG += staticlib
DEFINES *= OPENSSL_NO_IDEA
QMAKE_CXXFLAGS *= -Wall -Werror -W
QMAKE_CXXFLAGS *= -Werror -W
TARGET = ops
DESTDIR = lib

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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 #
################################################################################

View File

@ -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