summaryrefslogtreecommitdiff
path: root/sal/qa/OStringBuffer
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-31 10:37:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-31 10:37:26 +0100
commit155553ac9574aec457be10c4fef56a97dcbf7fdb (patch)
treeaff2d30b61a137dd8f9f5286511964859991d548 /sal/qa/OStringBuffer
parente3a47c09500828d27c096c5bfb461c61f6e71378 (diff)
Work around GCC -Wunused-result
(cf. <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425> "(void) cast doesn't suppress __attribute__((warn_unused_result))"). Interestingly, this only occurs with GCC 7, look like <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70365> "warn_unused_result doesn't warn when the result is a class with a destructor" is fixed now. Change-Id: I7b4a066d0bf59080e47404d718917b5f38a98832
Diffstat (limited to 'sal/qa/OStringBuffer')
-rw-r--r--sal/qa/OStringBuffer/rtl_OStringBuffer.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index 216730f9ba60..bcdc5c5ab07c 100644
--- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
+++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
@@ -132,7 +132,8 @@ namespace rtl_OStringBuffer
void ctor_005() {
rtl::OStringBuffer b1;
- (void)b1.makeStringAndClear();
+ auto dummy = b1.makeStringAndClear();
+ (void)dummy;
rtl::OStringBuffer b2(b1);
(void)b2;
}