Merge pull request #1235 from keepassxreboot/feature/warnings-as-errors

Treat warning as errors
This commit is contained in:
Janek Bevendorff 2017-11-27 22:48:03 +01:00 committed by GitHub
commit d2063cc357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -97,7 +97,7 @@ if(WITH_APP_BUNDLE)
endif()
add_gcc_compiler_flags("-fno-common")
add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long")
add_gcc_compiler_flags("-Wall -Werror -Wextra -Wundef -Wpointer-arith -Wno-long-long")
add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute")
add_gcc_compiler_flags("-fvisibility=hidden")
add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden")

View File

@ -1815,6 +1815,9 @@ reexecute:
case 2:
parser->upgrade = 1;
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 1:
parser->flags |= F_SKIPBODY;
@ -2374,6 +2377,9 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
case s_req_server_with_at:
found_at = 1;
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
/* FALLTROUGH */
case s_req_server:

View File

@ -95,7 +95,7 @@ bool SSHAgent::sendMessage(const QByteArray& in, QByteArray& out) const
return false;
}
if (in.length() > AGENT_MAX_MSGLEN - 4) {
if (static_cast<quint32>(in.length()) > AGENT_MAX_MSGLEN - 4) {
return false;
}

View File

@ -63,7 +63,7 @@ private:
#ifndef Q_OS_WIN
QString m_socketPath;
#else
const int AGENT_MAX_MSGLEN = 8192;
const quint32 AGENT_MAX_MSGLEN = 8192;
const quint32 AGENT_COPYDATA_ID = 0x804e50ba;
#endif