NOISSUE make the compiler more evil
This commit is contained in:
parent
44db72ead5
commit
457dd2e94e
@ -39,8 +39,8 @@ set(CMAKE_CXX_STANDARD 14)
|
|||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
include(Coverage)
|
include(Coverage)
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
set(CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Werror ${CMAKE_CXX_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pedantic -Werror -Werror=return-type")
|
||||||
|
|
||||||
# cmake code needed for the coverity scan upload
|
# cmake code needed for the coverity scan upload
|
||||||
include(Coverity)
|
include(Coverity)
|
||||||
@ -74,11 +74,12 @@ set(QUAZIP_VERSION "0.7.1")
|
|||||||
if(NOT EXISTS ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz)
|
if(NOT EXISTS ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz)
|
||||||
file(DOWNLOAD http://downloads.sourceforge.net/project/quazip/quazip/${QUAZIP_VERSION}/quazip-${QUAZIP_VERSION}.tar.gz ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz)
|
file(DOWNLOAD http://downloads.sourceforge.net/project/quazip/quazip/${QUAZIP_VERSION}/quazip-${QUAZIP_VERSION}.tar.gz ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz)
|
||||||
endif()
|
endif()
|
||||||
|
set(QUAZIP_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
|
||||||
ExternalProject_Add(QuaZIP
|
ExternalProject_Add(QuaZIP
|
||||||
SOURCE_DIR <BINARY_DIR>/../Source/quazip-${QUAZIP_VERSION}
|
SOURCE_DIR <BINARY_DIR>/../Source/quazip-${QUAZIP_VERSION}
|
||||||
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/.. ${CMAKE_COMMAND} -E tar xzf ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz
|
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/.. ${CMAKE_COMMAND} -E tar xzf ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz
|
||||||
PATCH_COMMAND patch -p0 -i ${CMAKE_SOURCE_DIR}/quazip.patch
|
PATCH_COMMAND patch -p0 -i ${CMAKE_SOURCE_DIR}/quazip.patch
|
||||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_FLAGS=${QUAZIP_CXX_FLAGS} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
||||||
)
|
)
|
||||||
include_directories("${CMAKE_BINARY_DIR}/External/Install/QuaZIP/include/quazip")
|
include_directories("${CMAKE_BINARY_DIR}/External/Install/QuaZIP/include/quazip")
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
#include "groupview/GroupedProxyModel.h"
|
#include "groupview/GroupedProxyModel.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +60,7 @@ private slots:
|
|||||||
/**
|
/**
|
||||||
* @brief write a string
|
* @brief write a string
|
||||||
* @param data the string
|
* @param data the string
|
||||||
* @param mode the WriteMode
|
* @param level the @MessageLevel the string should be written under
|
||||||
* lines have to be put through this as a whole!
|
* lines have to be put through this as a whole!
|
||||||
*/
|
*/
|
||||||
void write(QString data, MessageLevel::Enum level = MessageLevel::MultiMC);
|
void write(QString data, MessageLevel::Enum level = MessageLevel::MultiMC);
|
||||||
|
@ -16,7 +16,7 @@ class ServerStatus: public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit ServerStatus(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
|
explicit ServerStatus(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
|
||||||
virtual ~ServerStatus();
|
virtual ~ServerStatus();
|
||||||
;
|
|
||||||
public slots:
|
public slots:
|
||||||
void reloadStatus();
|
void reloadStatus();
|
||||||
void StatusChanged(const QMap<QString, QString> statuses);
|
void StatusChanged(const QMap<QString, QString> statuses);
|
||||||
|
@ -112,7 +112,7 @@ hoedown_buffer_grow(hoedown_buffer *buf, size_t neosz)
|
|||||||
while (neoasz < neosz)
|
while (neoasz < neosz)
|
||||||
neoasz += buf->unit;
|
neoasz += buf->unit;
|
||||||
|
|
||||||
buf->data = buf->data_realloc(buf->data, neoasz);
|
buf->data = (uint8_t *) buf->data_realloc(buf->data, neoasz);
|
||||||
buf->asize = neoasz;
|
buf->asize = neoasz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +29,7 @@ set(PACK200_SRC
|
|||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
add_library(unpack200 STATIC ${PACK200_SRC})
|
add_library(unpack200 STATIC ${PACK200_SRC})
|
||||||
target_include_directories(unpack200
|
target_include_directories(unpack200 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" PRIVATE ${ZLIB_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||||
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
|
||||||
PRIVATE ${ZLIB_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
target_link_libraries(unpack200 ${ZLIB_LIBRARIES})
|
target_link_libraries(unpack200 ${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
*
|
*
|
||||||
* @param input_path Path to the input file in PACK200 format. System native string encoding.
|
* @param input_path Path to the input file in PACK200 format. System native string encoding.
|
||||||
* @param output_path Path to the output file in PACK200 format. System native string encoding.
|
* @param output_path Path to the output file in PACK200 format. System native string encoding.
|
||||||
* @return void
|
|
||||||
* @throw std::runtime_error for any error encountered
|
* @throw std::runtime_error for any error encountered
|
||||||
*/
|
*/
|
||||||
void unpack_200(FILE * input, FILE * output);
|
void unpack_200(FILE * input_path, FILE * output_path);
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
struct bytes
|
struct bytes
|
||||||
{
|
{
|
||||||
int8_t *ptr;
|
int8_t *ptr;
|
||||||
|
@ -199,7 +199,7 @@ public:
|
|||||||
VersionBrokenFlag = 0x01,
|
VersionBrokenFlag = 0x01,
|
||||||
UpdateAvailable = 0x02
|
UpdateAvailable = 0x02
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(InstanceFlags, InstanceFlag);
|
Q_DECLARE_FLAGS(InstanceFlags, InstanceFlag)
|
||||||
InstanceFlags flags() const;
|
InstanceFlags flags() const;
|
||||||
void setFlags(const InstanceFlags &flags);
|
void setFlags(const InstanceFlags &flags);
|
||||||
void setFlag(const InstanceFlag flag);
|
void setFlag(const InstanceFlag flag);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
#include "BaseInstance.h"
|
#include "BaseInstance.h"
|
||||||
|
|
||||||
class NullInstance: public BaseInstance
|
class NullInstance: public BaseInstance
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
#include "IPathMatcher.h"
|
#include "IPathMatcher.h"
|
||||||
#include <SeparatorPrefixTree.h>
|
#include <SeparatorPrefixTree.h>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
@ -10,7 +12,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool matches(const QString &string) override
|
virtual bool matches(const QString &string) const override
|
||||||
{
|
{
|
||||||
return m_fsTree.covers(string);
|
return m_fsTree.covers(string);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user