You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't use cmake, so I'm doing a naive compile of a libfmt subtree in my own toolchain.
(using fmt @ e979c78)
I could easily add the -Wno-unused-result to my build, but maybe you'd want to tackle it upstream. This is gcc-8.2 on an Ubuntu 18.04 workstation, btw.
These could perhaps be mitigated with some (void) casts or pragmas or something.
[2019/03/28 17:32:10.092] /opt/mongodbtoolchain/v3/bin/g++ \
-o build/cached/third_party/fmt/dist/src/format.o \
-c -Woverloaded-virtual -Wno-maybe-uninitialized -std=c++17 \
-fno-omit-frame-pointer -fno-strict-aliasing -ggdb -pthread \
-Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror \
-O2 \
-Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -Wno-missing-braces \
-fstack-protector-strong -fno-builtin-memcmp -fPIE \
-DPCRE_STATIC -DNDEBUG -D_XOPEN_SOURCE=700 -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DABSL_FORCE_ALIGNED_ACCESS \
-Isrc/third_party/fmt/dist/include -Ibuild/cached -Isrc \
src/third_party/fmt/dist/src/format.cc
[2019/03/28 17:32:11.072] In file included from src/third_party/fmt/dist/src/format.cc:8:
[2019/03/28 17:32:11.072] src/third_party/fmt/dist/include/fmt/format-inl.h: In function 'void fmt::v5::{anonymous}::report_error(fmt::v5::{anonymous}::FormatFunc, int, fmt::v5::string_view)':
[2019/03/28 17:32:11.072] src/third_party/fmt/dist/include/fmt/format-inl.h:190:14: error: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Werror=unused-result]
[2019/03/28 17:32:11.072] std::fwrite(full_message.data(), full_message.size(), 1, stderr);
[2019/03/28 17:32:11.072] ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2019/03/28 17:32:11.072] src/third_party/fmt/dist/include/fmt/format-inl.h: In function 'void fmt::v5::vprint(FILE*, fmt::v5::string_view, fmt::v5::format_args)':
[2019/03/28 17:32:11.072] src/third_party/fmt/dist/include/fmt/format-inl.h:910:14: error: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Werror=unused-result]
[2019/03/28 17:32:11.072] std::fwrite(buffer.data(), 1, buffer.size(), f);
[2019/03/28 17:32:11.072] ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2019/03/28 17:32:11.072] src/third_party/fmt/dist/include/fmt/format-inl.h: In function 'void fmt::v5::vprint(FILE*, fmt::v5::wstring_view, fmt::v5::wformat_args)':
[2019/03/28 17:32:11.072] src/third_party/fmt/dist/include/fmt/format-inl.h:916:14: error: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Werror=unused-result]
[2019/03/28 17:32:11.072] std::fwrite(buffer.data(), sizeof(wchar_t), buffer.size(), f);
[2019/03/28 17:32:11.072] ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
We don't use cmake, so I'm doing a naive compile of a libfmt subtree in my own toolchain.
(using fmt @ e979c78)
I could easily add the -Wno-unused-result to my build, but maybe you'd want to tackle it upstream. This is gcc-8.2 on an Ubuntu 18.04 workstation, btw.
These could perhaps be mitigated with some
(void)
casts or pragmas or something.The text was updated successfully, but these errors were encountered: