Skip to content

Commit 70690ea

Browse files
committed
[#301] Fix warning
1 parent a68472e commit 70690ea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

iceoryx2-bb/cxx/include/iox2/bb/into.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#ifndef IOX2_BB_INTO_HPP
1616
#define IOX2_BB_INTO_HPP
1717

18+
#include "iox2/legacy/attributes.hpp"
1819
#include "iox2/legacy/type_traits.hpp"
1920

2021
namespace iox2 {
@@ -43,7 +44,7 @@ struct extract_into_type<lossy<T>> {
4344
template <typename SourceType, typename DestinationType>
4445
struct FromTrait {
4546
// AXIVION Next Construct AutosarC++19_03-A7.1.5 : 'auto' is only used for the generic implementation which will always result in a compile error
46-
static auto from(const SourceType& value) noexcept {
47+
static auto from(const SourceType& value IOX2_MAYBE_UNUSED) noexcept {
4748
static_assert(legacy::always_false_v<SourceType> && legacy::always_false_v<DestinationType>, "\n \
4849
Conversion for the specified types is not implemented!\n \
4950
Please specialize 'FromTrait::from'!\n \

iceoryx2-bb/cxx/tests/src/into_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ enum class B : uint8_t {
3232
namespace iox2 {
3333
namespace bb {
3434
template <>
35-
constexpr auto from<A, B>(A e) noexcept -> B {
36-
switch (e) {
35+
constexpr auto from<A, B>(A value) noexcept -> B {
36+
switch (value) {
3737
case A::A1:
3838
return B::B1;
3939
case A::A2:

0 commit comments

Comments
 (0)