From 825875e039b2c6c5a01e33a933d4dee3f933bb03 Mon Sep 17 00:00:00 2001 From: blankie Date: Mon, 4 Dec 2023 15:42:30 +1100 Subject: [PATCH] Fix compilation on GCC --- CMakeLists.txt | 2 +- models.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c70b1d..74cc537 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug|RelWithDebInfo") endif() # 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 add_link_options(${FLAGS}) diff --git a/models.cpp b/models.cpp index 895c0fa..8f0e0d6 100644 --- a/models.cpp +++ b/models.cpp @@ -205,12 +205,8 @@ time_t parse_rfc3339(const std::string& str) { .tm_mday = to_int(sm.str(3)), .tm_mon = to_int(sm.str(2)) - 1, .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_zone = nullptr, }; time_t time = mktime(&tm); if (time == -1) {