tree-sitter / tree-sitter-html

HTML grammar for Tree-sitter
MIT License
136 stars 72 forks source link

Quiet an "Implicit conversion loses integer precision" warning when building for Mac #70

Closed danielpunkass closed 9 months ago

danielpunkass commented 11 months ago

Without the cast in this PR, a warning is generated when building with "swift build", or with Xcode, and possibly when building directly with the clang compiler.

Implicit conversion loses integer precision: 'unsigned long' to 'uint32_t' (aka 'unsigned int')

It seems from inspection the value is unlikely to ever exceed the limit of the 32 bit unsigned int, so casting seems like a safe way to quiet the warning.