Silence GCC warnings
This commit is contained in:
parent
edbd11e075
commit
ca0f5e8a17
|
@ -19,7 +19,6 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug")
|
|||
endif()
|
||||
|
||||
# https://t.me/NightShadowsHangout/670691
|
||||
# # https://t.me/NightShadowsHangout/688372
|
||||
list(APPEND FLAGS -Werror -Wall -Wextra -Wshadow -Wpedantic -Wno-gnu-anonymous-struct -fPIC -fno-rtti -Wconversion -Wno-unused-parameter -Wimplicit-fallthrough)
|
||||
|
||||
# i have no idea why this hack wasn't needed before but it's needed if sanitizers are used
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
#include <exception>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
||||
#pragma GCC diagnostic ignored "-Wc99-extensions"
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
#include <hiredis.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ bool PixivClient::i_pximg_url_valid(const std::string& path) {
|
|||
static void to_lower(std::string& str) {
|
||||
for (size_t i = 0; i < str.size(); i++) {
|
||||
if (str[i] >= 'A' && str[i] <= 'Z') {
|
||||
str[i] = str[i] - 'A' + 'a';
|
||||
str[i] = static_cast<char>(str[i] - 'A' + 'a');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue