From fcf1619d1d13242ff316cf5232ef933cf58e04be Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 12 Nov 2022 18:25:03 +0100 Subject: fix warning --- serialize/json-helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'serialize') diff --git a/serialize/json-helper.cpp b/serialize/json-helper.cpp index eda628de..c3f861a4 100644 --- a/serialize/json-helper.cpp +++ b/serialize/json-helper.cpp @@ -23,7 +23,7 @@ static T open_stream(StringView filename) (void)::strerror_s(buf, std::size(buf), errno); #endif }; - const char* mode_str = mode & std::ios_base::out ? "writing" : "reading"; + const char* mode_str = (mode & std::ios_base::out) == std::ios_base::out ? "writing" : "reading"; (void)get_error_string(errbuf); fm_error("can't open file '%s' for %s: %s", filename.data(), mode_str, errbuf); } -- cgit v1.2.3