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
Building bonzomatic on armv7 FreeBSD 13.1, the build fails due to a missing cast.
/usr/bin/c++ -DGTK -DSCI_LEXER -DSCI_NAMESPACE -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/src -I/usr/local/include/stb -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/external/miniaudio -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/external/kiss_fft -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/external/kiss_fft/tools -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/external/jsonxx -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/external/scintilla/include -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/external/scintilla/lexlib -I/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/external/scintilla/src -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -std=c++11 -pthread -MD -MT CMakeFiles/bonzomatic.dir/src/main.cpp.o -MF CMakeFiles/bonzomatic.dir/src/main.cpp.o.d -o CMakeFiles/bonzomatic.dir/src/main.cpp.o -c /wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/src/main.cpp
/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/src/main.cpp:482:31: error: non-constant-expression cannot be narrowed from type 'int' to 'wchar_t' in initializer list [-Wc++11-narrowing]
wchar_t utf16[2] = {Renderer::keyEventBuffer[i].character, 0};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/bonzomatic/work/Bonzomatic-2022-06-18/src/main.cpp:482:31: note: insert an explicit cast to silence this issue
wchar_t utf16[2] = {Renderer::keyEventBuffer[i].character, 0};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<wchar_t>( )
1 error generated.
This is likely because char and wchar_t are unsigned types on ARM platforms, whereas they are signed on many other platforms. You may be able to reproduce this build failure on other platforms by compiling with -funsigned-char. In the FreeBSD project, we have added this patch to work around the issue:
Building bonzomatic on armv7 FreeBSD 13.1, the build fails due to a missing cast.
This is likely because
charandwchar_tare unsigned types on ARM platforms, whereas they are signed on many other platforms. You may be able to reproduce this build failure on other platforms by compiling with-funsigned-char. In the FreeBSD project, we have added this patch to work around the issue:Please check if the same patch can be applied to your code base or if some other fix is needed.
The text was updated successfully, but these errors were encountered: