Skip to content

Fix or disable conversion warnings? #84

@theuni

Description

@theuni

By default, Xcode adds warnings for implicit conversions that lose precision like:
Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int')

Noticed when testing the XCode output of #75. There are 10 instances of this and it's pretty annoying in the build logs.

For example:

size_t ComputeCapacity(uint32_t bits, size_t max_elements, uint32_t fpbits) {
    if (bits == 0) return 0;
    uint64_t base_fpbits = BaseFPBits(bits, max_elements);

Is there any interest in cleaning these up? Or would it be preferred to disable them with -Wconversion ?

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