Closed 0xADD1E closed 5 years ago
Should be fixed now, thanks. There might be some similar errors though. Please let me know if I can close this bug.
This seems to work great! Thank you!
It appears I spoke too soon. It worked on my local machine but not in the dockerfile. I'm seeing if I can apply similar fixes in https://github.com/0xADD1E/goxel
I think I will replace most of the strncpy with snprintf, since it's quite easy to make mistake with the former.
I am affected by this as well, on fedora 29.
cycles=0 werror=0 debug=0
seems to fix it.
@swedneck: this is with the current master branch?
@guillaumechereau yes, although my error has different numbers:
In file included from src/imgui.cpp:36:
In function ‘void ImStrncpy(char*, const char*, size_t)’,
inlined from ‘void ImStrncpy(char*, const char*, size_t)’ at src/../ext_src/imgui/imgui.cpp:1017:6,
inlined from ‘ImGuiTextFilter::ImGuiTextFilter(const char*)’ at src/../ext_src/imgui/imgui.cpp:1656:18:
src/../ext_src/imgui/imgui.cpp:1020:12: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 256 equals destination size [-Werror=stringop-truncation]
strncpy(dst, src, count);
~~~~~~~^~~~~~~~~~~~~~~~~
In function ‘void ImStrncpy(char*, const char*, size_t)’,
inlined from ‘bool ImGui::SetDragDropPayload(const char*, const void*, size_t, ImGuiCond)’ at src/../ext_src/imgui/imgui.cpp:1017:6:
src/../ext_src/imgui/imgui.cpp:1020:12: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 33 equals destination size [-Werror=stringop-truncation]
strncpy(dst, src, count);
~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
scons: *** [src/imgui.o] Error 1
scons: building terminated because of errors.
make: *** [Makefile:8: release] Error 2
Hi @swedneck, I pushed a small potential fix for this. If you have time could you tell me if the compilation works now?
Cheers.
@guillaumechereau It works fine now, thanks!
Out of the box, doesn't build on fedora 29 (gcc 8.3.1)
This appears to be related to GCC's handling of -O[3|fast] flags, and can be semi-solved by commenting out lines 63-65 of SConstruct (additional flags to be used in release mode)
Minimal reproduce Dockerfile: