mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
gcc: fix warnings for x32 architecture
Warning from x32 ABI compilation.
This commit is contained in:
parent
b1b60887f0
commit
ab73ad4e5f
@ -515,7 +515,7 @@ static void _set_time_prefix(char *prefix, int buflen)
|
|||||||
if (!len)
|
if (!len)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
len = dm_snprintf(prefix + len, buflen - len, ".%06ld ", ts.tv_nsec/1000);
|
len = dm_snprintf(prefix + len, buflen - len, ".%06d ", (int)ts.tv_nsec/1000);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@ -522,9 +522,9 @@ static int _get_sysinfo_memory(uint64_t *total_mb, uint64_t *available_mb)
|
|||||||
if (sysinfo(&si) != 0)
|
if (sysinfo(&si) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
log_debug("Sysinfo free:%lu bufferram:%lu sharedram:%lu freehigh:%lu unit:%u.",
|
log_debug("Sysinfo free:%llu bufferram:%llu sharedram:%llu freehigh:%llu unit:%u.",
|
||||||
si.freeram >> 20, si.bufferram >> 20, si.sharedram >> 20,
|
(unsigned long long)si.freeram >> 20, (unsigned long long)si.bufferram >> 20, (unsigned long long)si.sharedram >> 20,
|
||||||
si.freehigh >> 20, si.mem_unit);
|
(unsigned long long)si.freehigh >> 20, si.mem_unit);
|
||||||
|
|
||||||
*available_mb = ((uint64_t)(si.freeram + si.bufferram) * si.mem_unit) >> 30;
|
*available_mb = ((uint64_t)(si.freeram + si.bufferram) * si.mem_unit) >> 30;
|
||||||
*total_mb = si.totalram >> 30;
|
*total_mb = si.totalram >> 30;
|
||||||
|
Loading…
Reference in New Issue
Block a user