Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress minor warnings #631

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ jobs:
std: 17
with_tests: "OFF"

- os: windows-2022
platform: ARM
build_type: Release
std: 17
with_tests: "OFF"

steps:
- uses: actions/checkout@v4

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
- [v1.1.0](#v110)
- [v1.0.0](#v100)

## TBD

- Suppress `-Wredundant-decls` warning in GCC builds.
- Avoid adding `-Wno-gnu-zero-variadic-macro-arguments` for GCC in CMake.

## v7.5.0

- In previous versions, logging on Windows automatically included `windows.h` in all components. The frontend will no
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ target_include_directories(${TARGET_NAME}

# Compiler options
target_compile_options(${TARGET_NAME} INTERFACE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:-Wno-gnu-zero-variadic-macro-arguments>)
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-gnu-zero-variadic-macro-arguments>)

# Install
if (QUILL_MASTER_PROJECT OR QUILL_ENABLE_INSTALL)
Expand Down
2 changes: 1 addition & 1 deletion cmake/QuillUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function(set_common_compile_options target_name)

target_compile_options(${target_name} ${COMPILE_OPTIONS_VISIBILITY}
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -pedantic -Werror>
-Wall -Wextra -pedantic -Werror -Wredundant-decls>
$<$<CXX_COMPILER_ID:MSVC>:/bigobj /WX /W4 /wd4324 /wd4996>)

if (QUILL_NO_EXCEPTIONS)
Expand Down
9 changes: 9 additions & 0 deletions include/quill/core/Codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@ namespace detail
{

#if defined(_WIN32)
#if defined(__MINGW32__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#endif

/** We forward declare these to avoid including Utf8Conv.h **/
extern std::string utf8_encode(std::wstring_view str);
extern std::string utf8_encode(std::byte const* data, size_t wide_str_len);

#if defined(__MINGW32__)
#pragma GCC diagnostic pop
#endif
#endif

/**
Expand Down
9 changes: 9 additions & 0 deletions include/quill/core/ThreadContextManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,19 @@ namespace detail
class TransitEventBuffer;
class BackendWorker;

#if defined(__GNUC__) || defined(__clang__) || defined(__MINGW32__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#endif

/** We forward declare these to avoid including ThreadUtilities.h **/
extern std::string get_thread_name();
extern uint32_t get_thread_id() noexcept;

#if defined(__GNUC__) || defined(__clang__) || defined(__MINGW32__)
#pragma GCC diagnostic pop
#endif

class ThreadContext
{
private:
Expand Down