summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-08-19 19:11:37 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-09-06 18:31:43 +0200
commit68198de4dbe71ae97dc733606871f51bde804c1e (patch)
treedf68d428265f876367c7cd54d5e2c14f007c1964 /src/corelib/serialization
parentd3ff95dcb84861e8f42b480910d822b4ca8715b1 (diff)
Use C++17 [[maybe_unused]]
In some places needs to be ordered before const/constexpr though. Change-Id: I57a521ac0ad22b5a018761c4d52befbef69d64c0 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 c5d0c855e3..553f40e4bf 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;
}
-static CborError Q_DECL_UNUSED cbor_value_get_half_float_as_float(const CborValue *, float *)
+Q_DECL_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 51d4fefb6b..b3a5ed6eee 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
-static CborError Q_DECL_UNUSED cbor_encoder_close_container_checked(CborEncoder*, const CborEncoder*)
+Q_DECL_UNUSED static CborError cbor_encoder_close_container_checked(CborEncoder*, const CborEncoder*)
{
Q_UNREACHABLE();
return CborErrorInternalError;
}
-static CborError Q_DECL_UNUSED cbor_encode_float_as_half_float(CborEncoder *, float)
+Q_DECL_UNUSED static CborError cbor_encode_float_as_half_float(CborEncoder *, float)
{
Q_UNREACHABLE();
return CborErrorInternalError;