From fc4c242442510fb97c3cfbf04d7582ebbc3bb0ed Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 24 Apr 2024 15:51:43 -0700 Subject: Fix macos CI and clang warnings. (#4019) * Fix macos CI. * Fix. * Fix. * Fix. * Fix clang warnings. * Fix more warnings. --- source/compiler-core/slang-perfect-hash.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/compiler-core/slang-perfect-hash.cpp') diff --git a/source/compiler-core/slang-perfect-hash.cpp b/source/compiler-core/slang-perfect-hash.cpp index d5c4902ed..a741f013c 100644 --- a/source/compiler-core/slang-perfect-hash.cpp +++ b/source/compiler-core/slang-perfect-hash.cpp @@ -146,7 +146,7 @@ String perfectHashToEmbeddableCpp( w.print("bool %s(const UnownedStringSlice& str, %s& value)\n", String(funcName).getBuffer(), String(valueType).getBuffer()); line("{"); - w.print(" static const unsigned tableSalt[%ld] = {\n", hashParams.saltTable.getCount()); + w.print(" static const unsigned tableSalt[%d] = {\n", (int)hashParams.saltTable.getCount()); w.print(" "); for (Index i = 0; i < hashParams.saltTable.getCount(); ++i) { @@ -170,7 +170,7 @@ String perfectHashToEmbeddableCpp( w.print(" using KV = std::pair;\n", String(valueType).getBuffer()); line(""); - w.print(" static const KV words[%ld] =\n", hashParams.destTable.getCount()); + w.print(" static const KV words[%d] =\n", (int)hashParams.destTable.getCount()); line(" {"); for (Index i = 0; i < hashParams.destTable.getCount(); ++i) { @@ -191,7 +191,7 @@ String perfectHashToEmbeddableCpp( line(" UInt32 h = salt;"); line(" for (const char c : str)"); line(" h = (h * 0x01000193) ^ c;"); - w.print(" return h %% %ld;\n", hashParams.saltTable.getCount()); + w.print(" return h %% %d;\n", (int)hashParams.saltTable.getCount()); line(" };"); line(""); -- cgit v1.2.3