summaryrefslogtreecommitdiff
path: root/test/helpers.hpp
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2019-05-06 22:43:56 +0200
committerAndras Timar <andras.timar@collabora.com>2019-05-06 23:11:08 +0200
commit21012c1c74f143a5826802a8db5c964dfb0ad27f (patch)
treeb237b68fa1d774b1f9f6f381656ac8823383aa14 /test/helpers.hpp
parente62cdfae828bce64ab17ccce6620500a99236110 (diff)
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@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'test/helpers.hpp')
-rw-r--r--test/helpers.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/helpers.hpp b/test/helpers.hpp
index 2445ef3d2..0bbd3c686 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -660,7 +660,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;
}