Skip to content

C++: narrowing conversion warnings (64-bit ptrdiff_t to 32-bit int) in 'google/protobuf/repeated_field.h' in pointer arithmetics #20613

Open
@antrv

Description

@antrv

What version of protobuf and what language are you using?
Version: main
Language: C++

What operating system (Linux, Windows, ...) and version?
Windows 64-bit

What runtime / compiler are you using (e.g., python version or gcc version)
MSVC latest

A lot of warning in pointer arithmetics on 64-bit platform because of ptrdiff_t (64-bit) to int (32-bit) narrowing conversion in google/protobuf/repeated_field.h.

Possibly size field of RepeatedField class must be of type size_t instead of int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions