Skip to content

[C++] unsigned conversion from ‘int’ to ‘uint64_t’ #714

Closed
@trozen

Description

@trozen

With -Wsign-conversion -Werror options I'm getting compilation error on m_index assign:

        inline void wrapForDecode(
            char *buffer,
            std::uint64_t *pos,
            const std::uint64_t actingVersion,
            const std::uint64_t bufferLength)
        {
[...]
            m_index = -1;
[...]
        }

It would be better to define m_index as std::int64_t. (but then hasNext() needs to be adjusted as well)

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