On GCC 7.5.0, the current uvw::internal::fnv1a() function throws a -Wsign-conversion warning, despite us having an explicit cast.
src/uvw/type_info.hpp: In function 'constexpr uint32_t uvw::internal::fnv1a(const char*)':
src/uvw/type_info.hpp:24:26: warning: conversion to 'unsigned int' from 'char' may change the sign of the result [-Wsign-conversion]
value = (value ^ static_cast<std::uint32_t>(curr_val)) * prime;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This seems to be a bug in GCC 7.5.0, since newer versions of GCC are fine with it (including GCC 8). Moving the cast to another line fixes the warning, and it should all be compiled down to the same machine code anyway.
On GCC 7.5.0, the current
uvw::internal::fnv1a()
function throws a-Wsign-conversion
warning, despite us having an explicit cast.This seems to be a bug in GCC 7.5.0, since newer versions of GCC are fine with it (including GCC 8). Moving the cast to another line fixes the warning, and it should all be compiled down to the same machine code anyway.