From c30daf10ccce659c9e15f02e9ef443e0a8b2ebb0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Oct 2019 14:43:06 +0200 Subject: [PATCH] Explicitly cast -1 to fpos_t in our wxFtell() definition Apparently in at least some gcc versions fpos_t is not the same thing as long long int, resulting in compilation problems due to using different types for the ternary operator arguments. --- include/wx/filefn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/filefn.h b/include/wx/filefn.h index c75d309e36..b3ee95fa91 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -162,7 +162,7 @@ enum wxPosixPermissions inline long long wxFtell(FILE* fp) { fpos_t pos; - return fgetpos(fp, &pos) == 0 ? pos : -1LL; + return fgetpos(fp, &pos) == 0 ? pos : static_cast(-1LL); } #else #define wxFtell ftello64