Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix conversion warning on FreeBSD #2140

@Neverlord

Description

@Neverlord

When enabling -Wconversion on our FreeBSD 14 build, it fails:

In file included from /tmp/cirrus-ci-build/libcaf_core/caf/abstract_actor.cpp:11:
In file included from /tmp/cirrus-ci-build/libcaf_core/caf/actor_system.hpp:12:
In file included from /tmp/cirrus-ci-build/libcaf_core/caf/detail/format.hpp:18:
/tmp/cirrus-ci-build/libcaf_core/caf/detail/source_location.hpp:37:17: error: implicit conversion changes signedness: 'int' to 'uint_least32_t' (aka 'unsigned int') [-Werror,-Wsign-conversion]
   37 |     loc.line_ = line;
      |               ~ ^~~~

FreeBSD is using Clang 18.1.6, so it might not FreeBSD-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions