Skip to content

Commit

Permalink
Suppress warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryAWE committed Oct 4, 2024
1 parent 62dc114 commit 2788146
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
3 changes: 3 additions & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ macro(define_papilio_example example_name)
endmacro()

define_papilio_example(info)
if(WIN32)
target_compile_definitions(info PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()

define_papilio_example(script_demo)

Expand Down
9 changes: 0 additions & 9 deletions include/papilio/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,11 +1547,6 @@ namespace detail
}
} // namespace detail

#ifdef PAPILIO_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif

/**
* @brief Base of format argument storage.
*
Expand Down Expand Up @@ -1682,10 +1677,6 @@ class format_args_base
#endif
};

#ifdef PAPILIO_COMPILER_CLANG
# pragma clang diagnostic pop
#endif

PAPILIO_EXPORT template <typename T, typename Context = format_context>
struct is_format_args :
std::bool_constant<std::is_base_of_v<format_args_base<Context>, T>>
Expand Down
1 change: 1 addition & 0 deletions include/papilio/detail/prefix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# pragma clang diagnostic ignored "-Wpadded"
# pragma clang diagnostic ignored "-Wcovered-switch-default"
# pragma clang diagnostic ignored "-Wsuggest-destructor-override"
# pragma clang diagnostic ignored "-Wnon-virtual-dtor"

# if __clang_major__ >= 16
# pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
Expand Down
3 changes: 3 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function(configure_test test_target)
)
# Use a large DISCOVERY_TIMEOUT value reduce accidental CI failure
gtest_discover_tests(${test_target} DISCOVERY_TIMEOUT 1000)
if(WIN32)
target_compile_definitions(${test_target} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
endfunction()

macro(papilio_simple_test test_name)
Expand Down
5 changes: 1 addition & 4 deletions test/test_format/chrono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ static std::tm create_tm_epoch()
// The Unix epoch (January 1, 1970)
const std::time_t t = 0;
std::tm result{};
#ifdef PAPILIO_STDLIB_MSVC_STL
gmtime_s(&result, &t);
#else

result = *std::gmtime(&t);
#endif

return result;
}
Expand Down

0 comments on commit 2788146

Please sign in to comment.