summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-18 16:43:41 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-06-07 15:54:31 +0000
commitd254d8c19714af69a9897bdd67c4e9aa3267c3a3 (patch)
tree1b82236c071690ec3a5539e846f68bbd42dbcade /src/corelib/tools/qbytearray.h
parent6ae801875ea3c654f808b7ed519b403807653068 (diff)
Use the C++ [[nodiscard]] attribute
Change-Id: I7814054a102a407d876ffffd14b6a285c70b21de Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r--src/corelib/tools/qbytearray.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 03bb9b5747..432ef922f6 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -243,7 +243,7 @@ public:
void chop(int n);
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC)
-# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL) && !QT_HAS_CPP_ATTRIBUTE(nodiscard)
// required due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61941
# pragma push_macro("Q_REQUIRED_RESULT")
# undef Q_REQUIRED_RESULT