Test fails syntax check on aarch64
When building my golang-modernc-sqlite package on Fedora, I found that a check fails on arm64. Here is the error message:
modernc.org/sqlite/vfs
# modernc.org/sqlite/vfs [modernc.org/sqlite/vfs.test]
./vfs_linux_arm64.go:1358:44: cannot use uint32(294) (constant 294 of type uint32) as int32 value in argument to libc.X__assert_fail
FAIL modernc.org/sqlite/vfs [build failed]
I found that the equivalent line in vfs/vfs_linux_amd64.go
did not cast the value (there, the value is 296, and it appears on line 1327). That is, arm64 uses uint32(294)
, whereas amd64 uses 296
. I think we should remove the cast from arm64, since Go will apply the correct type to the literal. I patched the (generated) vfs_linux_arm64.go
, and this fixed the check.
I thought there would also a problem in vfs_linux_s390x.go
, but it checked fine despite the cast.
I am packaging sqlite v1.30.0 along with libc v1.51.0 (plus commits c2b6a3ab255c86d92df4cba74e8ec9f5b1e25282 and 59d8c2f2cf30b5d3c49083b7d02408fba7f23681, which are my funny character/quote fixes).