In elfio_segment.hpp, line 172, a ULLONG is passed to set_stream_size.
On platforms where sizeof(size_t) != sizeof(uint64_t), this will cause a compile time warning about constant conversion.
This also affects elfio_section.hpp
I am raising this issue because (strangely enough), I have a 32-bit use case.
My project consumes this library, and outputs a WASM binary.
WASM, as of right now, always uses 32-bit pointers, which to my understanding means size_t is 32-bits, not 64-bits.
This causes my compilation logs to be flooded with constant conversion warning.
I see two easy ways to fix this:
Change the signature of set_stream_size to always take a uint64_t.
Pass a value of std::numeric_limits<size_t>::max() to set_stream_size (see reference).
My preference would be option 2, as this would avoid API type changes.
If either of these approaches are acceptable, I will open a pull request.
In elfio_segment.hpp, line 172, a ULLONG is passed to set_stream_size. On platforms where sizeof(size_t) != sizeof(uint64_t), this will cause a compile time warning about constant conversion. This also affects elfio_section.hpp
I am raising this issue because (strangely enough), I have a 32-bit use case. My project consumes this library, and outputs a WASM binary. WASM, as of right now, always uses 32-bit pointers, which to my understanding means size_t is 32-bits, not 64-bits. This causes my compilation logs to be flooded with constant conversion warning.
I see two easy ways to fix this:
std::numeric_limits<size_t>::max()
to set_stream_size (see reference).My preference would be option 2, as this would avoid API type changes.
If either of these approaches are acceptable, I will open a pull request.