summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-02 10:47:47 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-03 11:58:08 +0200
commitc82f73666d87549e5884ddcd253ec3561d840b9b (patch)
tree96eff624e0add180490d014abce92fccf9542f5b /src/corelib/serialization
parent889d40ebe2d9d0e92caea2749608720f7c088173 (diff)
Replace Q_DECL_UNUSED with [[maybe_unused]]
Use C++17 attribute directly Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r--src/corelib/serialization/qcborstreamreader.cpp2
-rw-r--r--src/corelib/serialization/qcborstreamwriter.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/serialization/qcborstreamreader.cpp b/src/corelib/serialization/qcborstreamreader.cpp
index 553f40e4bf..22cb04a8ef 100644
--- a/src/corelib/serialization/qcborstreamreader.cpp
+++ b/src/corelib/serialization/qcborstreamreader.cpp
@@ -74,7 +74,7 @@ static CborError _cbor_value_dup_string(const CborValue *, void **, size_t *, Cb
Q_UNREACHABLE();
return CborErrorInternalError;
}
-Q_DECL_UNUSED static CborError cbor_value_get_half_float_as_float(const CborValue *, float *)
+[[maybe_unused]] static CborError cbor_value_get_half_float_as_float(const CborValue *, float *)
{
Q_UNREACHABLE();
return CborErrorInternalError;
diff --git a/src/corelib/serialization/qcborstreamwriter.cpp b/src/corelib/serialization/qcborstreamwriter.cpp
index b3a5ed6eee..ff6cbbec00 100644
--- a/src/corelib/serialization/qcborstreamwriter.cpp
+++ b/src/corelib/serialization/qcborstreamwriter.cpp
@@ -63,13 +63,13 @@ QT_WARNING_POP
// silence compilers that complain about this being a static function declared
// but never defined
-Q_DECL_UNUSED static CborError cbor_encoder_close_container_checked(CborEncoder*, const CborEncoder*)
+[[maybe_unused]] static CborError cbor_encoder_close_container_checked(CborEncoder*, const CborEncoder*)
{
Q_UNREACHABLE();
return CborErrorInternalError;
}
-Q_DECL_UNUSED static CborError cbor_encode_float_as_half_float(CborEncoder *, float)
+[[maybe_unused]] static CborError cbor_encode_float_as_half_float(CborEncoder *, float)
{
Q_UNREACHABLE();
return CborErrorInternalError;