diff options
author | Sam Clegg <sbc@chromium.org> | 2022-03-06 17:40:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-06 09:40:13 -0800 |
commit | 3ccf6dbb878e0c22b06e421e3e33eda776cfa20c (patch) | |
tree | 1166439cb1b2ceadb2c5750222c57172f317e635 /src | |
parent | f94830cd36b728f01ef7eef1ef3608b2a8945cdc (diff) | |
download | wabt-3ccf6dbb878e0c22b06e421e3e33eda776cfa20c.tar.gz wabt-3ccf6dbb878e0c22b06e421e3e33eda776cfa20c.tar.bz2 wabt-3ccf6dbb878e0c22b06e421e3e33eda776cfa20c.zip |
Fix clang warnings introduced by #1847 (#1849)
Diffstat (limited to 'src')
-rw-r--r-- | src/c-writer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c-writer.cc b/src/c-writer.cc index 392e5e0a..04fdeca9 100644 --- a/src/c-writer.cc +++ b/src/c-writer.cc @@ -461,9 +461,9 @@ std::string CWriter::LegalizeName(std::string_view name) { return "_"; std::string result; - result = isalpha((unsigned char)name[0]) ? name[0] : '_'; + result = isalpha(static_cast<unsigned char>(name[0])) ? name[0] : '_'; for (size_t i = 1; i < name.size(); ++i) - result += isalnum((unsigned char)name[i]) ? name[i] : '_'; + result += isalnum(static_cast<unsigned char>(name[i])) ? name[i] : '_'; // In addition to containing valid characters for C, we must also avoid // colliding with things C cares about, such as reserved words (e.g. "void") |