[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - test/helpers.hpp
Andras Timar (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 10 13:09:58 UTC 2019
test/helpers.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit c6bbe9057953a4e4c3053e51617d21b6a6f91c58
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Mon May 6 22:43:56 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jul 10 15:09:34 2019 +0200
do not ignore the result of fwrite...
... at least from compiler point of view.
On some systems with old glibc (<= 2.15) the fwrite function has
the warn_unused_result attribute. That makes the build fail.
Starting with glibc 2.16 the attribute was removed [1].
[1]
The bug: https://sourceware.org/bugzilla/show_bug.cgi?id=11959
Release notes to 2.16:
https://sourceware.org/ml/libc-alpha/2012-06/msg00807.html
Change-Id: Ia62ccff2120dce51e311303124aadc60c134a1aa
Reviewed-on: https://gerrit.libreoffice.org/71880
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/test/helpers.hpp b/test/helpers.hpp
index f5b033c04..7414b27d4 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -668,7 +668,8 @@ inline bool svgMatch(const char *testname, const std::vector<char> &response, co
TST_LOG_APPEND("Updated template writing to: " << newName << "\n");
TST_LOG_END;
FILE *of = fopen(Poco::Path(TDOC, newName).toString().c_str(), "w");
- fwrite(response.data(), response.size(), 1, of);
+ size_t unused = fwrite(response.data(), response.size(), 1, of);
+ (void)unused;
fclose(of);
return false;
}
More information about the Libreoffice-commits
mailing list