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

iox-#2011 Silence some warnings when building with GCC 13. #2296

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
2 changes: 2 additions & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

**Refactoring:**

- Silence warnings when building with GCC 13 [\#2011](https://github.com/eclipse-iceoryx/iceoryx/issues/2011)

**New API features:**

**API Breaking Changes:**
Expand Down
10 changes: 10 additions & 0 deletions iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/variant_queue.inl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef IOX_HOOFS_CXX_VARIANT_QUEUE_INL
#define IOX_HOOFS_CXX_VARIANT_QUEUE_INL

#include "iceoryx_hoofs/cxx/variant_queue.hpp"
#include "iceoryx_hoofs/error_handling/error_handling.hpp"

namespace iox
Expand Down Expand Up @@ -49,6 +50,11 @@ inline VariantQueue<ValueType, Capacity>::VariantQueue(const VariantQueueTypes t
}
}

#if (defined(__GNUC__) && __GNUC__ >= 13 && !defined(__clang__))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif

template <typename ValueType, uint64_t Capacity>
optional<ValueType> VariantQueue<ValueType, Capacity>::push(const ValueType& value) noexcept
{
Expand Down Expand Up @@ -90,6 +96,10 @@ optional<ValueType> VariantQueue<ValueType, Capacity>::push(const ValueType& val
return cxx::nullopt;
}

#if (defined(__GNUC__) && __GNUC__ >= 13 && !defined(__clang__))
#pragma GCC diagnostic pop
#endif

template <typename ValueType, uint64_t Capacity>
inline optional<ValueType> VariantQueue<ValueType, Capacity>::pop() noexcept
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ inline bool ChunkDistributor<ChunkDistributorDataType>::hasStoredQueues() const
return !getMembers()->m_queues.empty();
}

#if (defined(__GNUC__) && __GNUC__ >= 13 && !defined(__clang__))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif

template <typename ChunkDistributorDataType>
inline uint64_t ChunkDistributor<ChunkDistributorDataType>::deliverToAllStoredQueues(mepoo::SharedChunk chunk) noexcept
{
Expand Down Expand Up @@ -209,6 +214,10 @@ inline uint64_t ChunkDistributor<ChunkDistributorDataType>::deliverToAllStoredQu
return numberOfQueuesTheChunkWasDeliveredTo;
}

#if (defined(__GNUC__) && __GNUC__ >= 13 && !defined(__clang__))
#pragma GCC diagnostic pop
#endif

template <typename ChunkDistributorDataType>
inline bool ChunkDistributor<ChunkDistributorDataType>::pushToQueue(cxx::not_null<ChunkQueueData_t* const> queue,
mepoo::SharedChunk chunk) noexcept
Expand Down
Loading