Skip to content

Type of streamIdx in struct IndexPrologue #2

@marvin2k

Description

@marvin2k

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions