mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
Fix clang's variadic macro warnings
Using variadic macros like `qCWarning()` without any parameter for "..." is a GNU extension, which causes a lot of `clang` warnings: ``` desktop/src/common/ownsql.cpp:74:24: warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments] qCWarning(lcSql) << "Error:" << _error << "for" << filename; ^ /usr/include/qt/QtCore/qloggingcategory.h:140:11: note: macro 'qCWarning' defined here ^ ``` This patch tells `clang` to be silent. Signed-off-by: Johannes Lorenz <j.git@lorenz-ho.me>
This commit is contained in:
parent
08c7be5350
commit
8c334a1f43
1 changed files with 5 additions and 0 deletions
|
@ -31,6 +31,11 @@ if(NOT MSVC)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU
|
||||
# extension (C++11 §16.3/4 forbids them). Silence clang's warnings.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
|
||||
|
||||
if(WIN32)
|
||||
# Enable DEP & ASLR
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /nxcompat /dynamicbase")
|
||||
|
|
Loading…
Reference in a new issue