mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
option: Silence PVS/V547: expression is true on 64-bit systems
This commit is contained in:
parent
d0850586df
commit
fab09ea0d6
@ -625,12 +625,12 @@ void set_init_1(void)
|
|||||||
opt_idx = findoption("maxmemtot");
|
opt_idx = findoption("maxmemtot");
|
||||||
if (opt_idx >= 0) {
|
if (opt_idx >= 0) {
|
||||||
{
|
{
|
||||||
/* Use half of amount of memory available to Vim. */
|
// Use half of amount of memory available to Vim.
|
||||||
/* If too much to fit in uintptr_t, get uintptr_t max */
|
// If too much to fit in uintptr_t, get uintptr_t max.
|
||||||
uint64_t available_kib = os_get_total_mem_kib();
|
uint64_t available_kib = os_get_total_mem_kib();
|
||||||
uintptr_t n = available_kib / 2 > UINTPTR_MAX
|
uintptr_t n = (available_kib / 2 > UINTPTR_MAX // -V547
|
||||||
? UINTPTR_MAX
|
? UINTPTR_MAX
|
||||||
: (uintptr_t)(available_kib /2);
|
: (uintptr_t)(available_kib /2));
|
||||||
options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
|
options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
|
||||||
opt_idx = findoption("maxmem");
|
opt_idx = findoption("maxmem");
|
||||||
if (opt_idx >= 0) {
|
if (opt_idx >= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user