summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-10-11 19:56:31 +0200
committerPetr Mrázek <peterix@gmail.com>2015-10-11 19:56:31 +0200
commit457dd2e94e3c1e6cf51b7cbe264927b213d1085c (patch)
treed603f16f1fbe61504747ce972e1b3c8f005328d1
parent44db72ead568fe7ce22e1999aac02fd9aac9beea (diff)
downloadMultiMC-457dd2e94e3c1e6cf51b7cbe264927b213d1085c.tar
MultiMC-457dd2e94e3c1e6cf51b7cbe264927b213d1085c.tar.gz
MultiMC-457dd2e94e3c1e6cf51b7cbe264927b213d1085c.tar.lz
MultiMC-457dd2e94e3c1e6cf51b7cbe264927b213d1085c.tar.xz
MultiMC-457dd2e94e3c1e6cf51b7cbe264927b213d1085c.zip
NOISSUE make the compiler more evil
-rw-r--r--CMakeLists.txt7
-rw-r--r--application/InstanceProxyModel.h2
-rw-r--r--application/pages/LogPage.h2
-rw-r--r--application/widgets/ServerStatus.h2
-rw-r--r--depends/hoedown/src/buffer.c2
-rw-r--r--depends/pack200/CMakeLists.txt4
-rw-r--r--depends/pack200/include/unpack200.h3
-rw-r--r--depends/pack200/src/bytes.h2
-rw-r--r--logic/BaseInstance.h2
-rw-r--r--logic/NullInstance.h1
-rw-r--r--logic/pathmatcher/FSTreeMatcher.h4
11 files changed, 18 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f432f851..41f9489d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,8 +39,8 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_STANDARD 11)
include(Coverage)
include(GenerateExportHeader)
-set(CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
+set(CMAKE_CXX_FLAGS "-Wall -pedantic -Werror ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pedantic -Werror -Werror=return-type")
# cmake code needed for the coverity scan upload
include(Coverity)
@@ -74,11 +74,12 @@ set(QUAZIP_VERSION "0.7.1")
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)
endif()
+set(QUAZIP_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
ExternalProject_Add(QuaZIP
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
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")
if(UNIX)
diff --git a/application/InstanceProxyModel.h b/application/InstanceProxyModel.h
index e558efc4..cc6c1b86 100644
--- a/application/InstanceProxyModel.h
+++ b/application/InstanceProxyModel.h
@@ -1,3 +1,5 @@
+#pragma once
+
#include "groupview/GroupedProxyModel.h"
/**
diff --git a/application/pages/LogPage.h b/application/pages/LogPage.h
index b34a63af..ce89c3f2 100644
--- a/application/pages/LogPage.h
+++ b/application/pages/LogPage.h
@@ -60,7 +60,7 @@ private slots:
/**
* @brief write a 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!
*/
void write(QString data, MessageLevel::Enum level = MessageLevel::MultiMC);
diff --git a/application/widgets/ServerStatus.h b/application/widgets/ServerStatus.h
index f0b6e223..9beb8e4f 100644
--- a/application/widgets/ServerStatus.h
+++ b/application/widgets/ServerStatus.h
@@ -16,7 +16,7 @@ class ServerStatus: public QWidget
public:
explicit ServerStatus(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
virtual ~ServerStatus();
- ;
+
public slots:
void reloadStatus();
void StatusChanged(const QMap<QString, QString> statuses);
diff --git a/depends/hoedown/src/buffer.c b/depends/hoedown/src/buffer.c
index 12969c5f..1c7ba55a 100644
--- a/depends/hoedown/src/buffer.c
+++ b/depends/hoedown/src/buffer.c
@@ -112,7 +112,7 @@ hoedown_buffer_grow(hoedown_buffer *buf, size_t neosz)
while (neoasz < neosz)
neoasz += buf->unit;
- buf->data = buf->data_realloc(buf->data, neoasz);
+ buf->data = (uint8_t *) buf->data_realloc(buf->data, neoasz);
buf->asize = neoasz;
}
diff --git a/depends/pack200/CMakeLists.txt b/depends/pack200/CMakeLists.txt
index 19a7643c..b060905b 100644
--- a/depends/pack200/CMakeLists.txt
+++ b/depends/pack200/CMakeLists.txt
@@ -29,9 +29,7 @@ set(PACK200_SRC
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(unpack200 STATIC ${PACK200_SRC})
-target_include_directories(unpack200
- PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
- PRIVATE ${ZLIB_INCLUDE_DIRS})
+target_include_directories(unpack200 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" PRIVATE ${ZLIB_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(unpack200 ${ZLIB_LIBRARIES})
diff --git a/depends/pack200/include/unpack200.h b/depends/pack200/include/unpack200.h
index f9239488..9c3eda2d 100644
--- a/depends/pack200/include/unpack200.h
+++ b/depends/pack200/include/unpack200.h
@@ -31,7 +31,6 @@
*
* @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.
- * @return void
* @throw std::runtime_error for any error encountered
*/
-void unpack_200(FILE * input, FILE * output);
+void unpack_200(FILE * input_path, FILE * output_path);
diff --git a/depends/pack200/src/bytes.h b/depends/pack200/src/bytes.h
index 6ed0b729..b116efda 100644
--- a/depends/pack200/src/bytes.h
+++ b/depends/pack200/src/bytes.h
@@ -23,6 +23,8 @@
* questions.
*/
+#pragma once
+
struct bytes
{
int8_t *ptr;
diff --git a/logic/BaseInstance.h b/logic/BaseInstance.h
index 8c0c098b..cc8ebb02 100644
--- a/logic/BaseInstance.h
+++ b/logic/BaseInstance.h
@@ -199,7 +199,7 @@ public:
VersionBrokenFlag = 0x01,
UpdateAvailable = 0x02
};
- Q_DECLARE_FLAGS(InstanceFlags, InstanceFlag);
+ Q_DECLARE_FLAGS(InstanceFlags, InstanceFlag)
InstanceFlags flags() const;
void setFlags(const InstanceFlags &flags);
void setFlag(const InstanceFlag flag);
diff --git a/logic/NullInstance.h b/logic/NullInstance.h
index dc2a8de3..d46230f4 100644
--- a/logic/NullInstance.h
+++ b/logic/NullInstance.h
@@ -1,3 +1,4 @@
+#pragma once
#include "BaseInstance.h"
class NullInstance: public BaseInstance
diff --git a/logic/pathmatcher/FSTreeMatcher.h b/logic/pathmatcher/FSTreeMatcher.h
index f99e45c9..a5bed57c 100644
--- a/logic/pathmatcher/FSTreeMatcher.h
+++ b/logic/pathmatcher/FSTreeMatcher.h
@@ -1,3 +1,5 @@
+#pragma once
+
#include "IPathMatcher.h"
#include <SeparatorPrefixTree.h>
#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);
}