Hi,
the member streamIdx in struct IndexPrologue is of type int16_t, the stream_idx in struct BlockHeader is of uint16_t. Then other places use size_t or even int for stream-indexing.
This triggers a -Wsign-compare here.
Changing the signedness of streamIdx in IndexProloque to uint16_t allows to use the same type for all stream indexing. It will break the on-disk format, but only for files with many streams, which are already broken because of the silent overflow?
Changing the size of the members in IndexPrologue or BlockHeader will change the on-disk format and is not an option.
Hi,
the member
streamIdxin struct IndexPrologue is of typeint16_t, thestream_idxin struct BlockHeader is ofuint16_t. Then other places use size_t or even int for stream-indexing.This triggers a
-Wsign-comparehere.Changing the signedness of streamIdx in IndexProloque to
uint16_tallows to use the same type for all stream indexing. It will break the on-disk format, but only for files with many streams, which are already broken because of the silent overflow?Changing the size of the members in IndexPrologue or BlockHeader will change the on-disk format and is not an option.