STX_INTERNAL_MAKE_REPORT_ warnings with -Wsign-conversion
nyanpasu64 opened this issue · 1 comments
Describe the bug
When I include STX master in a CMake project where I build my source files with -Wconversion -Wsign-conversion
, then STX_INTERNAL_MAKE_REPORT_
raises a sign conversion warning when converting fmt_buffer_size
to size_t
.
Lines 334 to 343 in 9f8f97a
Expected behavior
The code has two branches, returning a formatting error if fmt_buffer_size < 0
. So fmt_buffer_size
is only casted to size_t
if non-negative. So perhaps insert an explicit cast (do you prefer static_cast over C-style casts?)?
Additional context
Is compiling warning-free with -Wsign-conversion
in-scope?
seems this has been solved
STX/include/stx/panic/report.h
Line 53 in 34f497d