Skip to content

GCC -Wuseless-cast warnings #1777

@tambry

Description

@tambry

Using the GCC -Wuseless-cast results in the following warnings:

_deps/json-src/single_include/nlohmann/json.hpp: In member function ‘bool nlohmann::detail::binary_reader<BasicJsonType, SAX>::parse_cbor_internal(bool)’:
_deps/json-src/single_include/nlohmann/json.hpp:4058:109: warning: useless cast to type ‘std::size_t’ {aka ‘long unsigned int’} [-Wuseless-cast]
 4058 |                 return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len));
      |                                                                                                             ^
_deps/json-src/single_include/nlohmann/json.hpp:4112:110: warning: useless cast to type ‘std::size_t’ {aka ‘long unsigned int’} [-Wuseless-cast]
 4112 |                 return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len));
      |                                                                                                              ^

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions