[Libreoffice-commits] core.git: sal/qa
Stephan Bergmann
sbergman at redhat.com
Tue Jan 31 09:40:12 UTC 2017
sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 155553ac9574aec457be10c4fef56a97dcbf7fdb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 31 10:37:26 2017 +0100
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
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index 216730f..bcdc5c5 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;
}
More information about the Libreoffice-commits
mailing list