Skip to content

0.4

@dechamps dechamps tagged this 18 Dec 15:08
See https://en.cppreference.com/w/cpp/string/byte/isalnum:

> Like all other functions from <cctype>, the behavior of
> std::isalnum is undefined if the argument's value is neither
> representable as unsigned char nor equal to EOF. To use these
> functions safely with plain chars (or signed chars), the argument
> should first be converted to unsigned char

This issue was found by the Visual C++ Static Analyzer (/analyze):

  toml\toml.h(805) : warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isalnum'.
  toml\toml.h(821) : warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isalpha'.
  toml\toml.h(824) : warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isalpha'.
  toml\toml.h(1304) : warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isalnum'.
Assets 2
Loading