Fix compilation on GCC

This commit is contained in:
blankie 2023-12-04 15:42:30 +11:00
parent 8635127ec3
commit 825875e039
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
2 changed files with 1 additions and 5 deletions

View File

@ -23,7 +23,7 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug|RelWithDebInfo")
endif() endif()
# https://t.me/NightShadowsHangout/670691 # https://t.me/NightShadowsHangout/670691
list(APPEND FLAGS -Werror -Wall -Wextra -Wshadow -Wpedantic -Wno-gnu-anonymous-struct -fPIC -fno-rtti -Wconversion -Wno-unused-parameter -Wimplicit-fallthrough) list(APPEND FLAGS -Werror -Wall -Wextra -Wshadow -Wpedantic -Wno-gnu-anonymous-struct -Wno-missing-field-initializers -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 # i have no idea why this hack wasn't needed before but it's needed if sanitizers are used
add_link_options(${FLAGS}) add_link_options(${FLAGS})

View File

@ -205,12 +205,8 @@ time_t parse_rfc3339(const std::string& str) {
.tm_mday = to_int(sm.str(3)), .tm_mday = to_int(sm.str(3)),
.tm_mon = to_int(sm.str(2)) - 1, .tm_mon = to_int(sm.str(2)) - 1,
.tm_year = to_int(sm.str(1)) - 1900, .tm_year = to_int(sm.str(1)) - 1900,
.tm_wday = -1,
.tm_yday = -1,
.tm_isdst = -1,
.tm_gmtoff = !sm.str(7).empty() ? 0 : to_int(sm.str(8)) * 60 * 60 + to_int(sm.str(9)) * 60, .tm_gmtoff = !sm.str(7).empty() ? 0 : to_int(sm.str(8)) * 60 * 60 + to_int(sm.str(9)) * 60,
.tm_zone = nullptr,
}; };
time_t time = mktime(&tm); time_t time = mktime(&tm);
if (time == -1) { if (time == -1) {