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
// indicators_issue.cpp
#include<indicators/progress_bar.hpp>intmain()
{
int n = 100;
indicators::ProgressBar pbar{
indicators::option::MaxProgress{n},
};
for (int i = 0; i < n; ++i) {
pbar.tick();
}
return0;
}
compiling with gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 10.3.0 I get the following annoying warnings:
In file included from C:/project/build/_deps/indicators_git-src/include/indicators/details/stream_helper.hpp:5,
from C:/project/build/_deps/indicators_git-src/include/indicators/progress_bar.hpp:5,
from C:\project\examples\indicators_issue.cpp:1:
C:/project/build/_deps/indicators_git-src/include/indicators/display_width.hpp: In function'int unicode::details::mk_wcwidth(wchar_t)':C:/project/build/_deps/indicators_git-src/include/indicators/display_width.hpp:201:57: warning: comparison is always false due to limited range of data type [-Wtype-limits] 201 | (ucs >= 0xffe0 && ucs <= 0xffe6) || (ucs >= 0x20000 && ucs <= 0x2fffd) || | ~~~~^~~~~~~~~~C:/project/build/_deps/indicators_git-src/include/indicators/display_width.hpp:201:75: warning: comparison is always true due to limited range of data type [-Wtype-limits] 201 | (ucs >= 0xffe0 && ucs <= 0xffe6) || (ucs >= 0x20000 && ucs <= 0x2fffd) || | ~~~~^~~~~~~~~~C:/project/build/_deps/indicators_git-src/include/indicators/display_width.hpp:202:21: warning: comparison is always false due to limited range of data type [-Wtype-limits] 202 | (ucs >= 0x30000 && ucs <= 0x3fffd))); | ~~~~^~~~~~~~~~C:/project/build/_deps/indicators_git-src/include/indicators/display_width.hpp:202:39: warning: comparison is always true due to limited range of data type [-Wtype-limits] 202 | (ucs >= 0x30000 && ucs <= 0x3fffd)));
Can these comparisons be removed?
The text was updated successfully, but these errors were encountered:
On windows compiling the example
compiling with
gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 10.3.0
I get the following annoying warnings:Can these comparisons be removed?
The text was updated successfully, but these errors were encountered: