diff options
| author | Randy Palamar <palamar@ualberta.ca> | 2023-08-27 09:01:01 -0600 |
|---|---|---|
| committer | Randy Palamar <palamar@ualberta.ca> | 2023-08-27 09:01:01 -0600 |
| commit | 0ec372eb2b213292a610d9b64e8d1d37e9597c9a (patch) | |
| tree | 24699676c727c503424f6e7d85c275d7572305e0 /lua | |
| parent | 514fae450a53d6887f07aae729348c8fbbb52225 (diff) | |
| download | vis-0ec372eb2b213292a610d9b64e8d1d37e9597c9a.tar.gz vis-0ec372eb2b213292a610d9b64e8d1d37e9597c9a.tar.xz | |
vis-lua.c: silence warning about implicit conversion
`SIZE_MAX` cannot be represented accurately in `lua_Number`. A correct
solution probably doesn't exist but we can silence the warning by
explicitly casting to `lua_Number` and changing the comparison to `<`
instead of `<=`.
checkpos() deals with large numbers for file ranges. For most users we
can assume no one is editing files that are `SIZE_MAX` bytes long (many
petabytes). For obscure systems where `SIZE_MAX` is a small number this
will result in a maximum range (in lua) of 1 byte less than before.
fixes #1120: vis-lua.c:504:21: warning: implicit conversion changes value
Diffstat (limited to 'lua')
0 files changed, 0 insertions, 0 deletions
