Fix two compiler warnings on 32-bit platforms that have mallinfo() but
not mallinfo2(). These showed up when building e2fsprogs for armv7a or
i686 Android using the Android NDK, targeting Android API level 32 or
lower and using the autotools-based build system.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
} else
#elif defined HAVE_MALLINFO
/* don't use mallinfo() if over 2GB used, since it returns "int" */
- if ((char *)sbrk(0) - (char *)track->brk_start < 2LL << 30) {
+ if ((unsigned long)((char *)sbrk(0) - (char *)track->brk_start) <
+ 2UL << 30) {
struct mallinfo malloc_info = mallinfo();
printf("Memory used: %lluk/%lluk (%lluk/%lluk), ",
} else
#elif defined HAVE_MALLINFO
/* don't use mallinfo() if over 2GB used, since it returns "int" */
- if ((char *)sbrk(0) - (char *)track->brk_start < 2LL << 30) {
+ if ((unsigned long)((char *)sbrk(0) - (char *)track->brk_start) <
+ 2UL << 30) {
struct mallinfo malloc_info = mallinfo();
log_out(ctx, _("Memory used: %lluk/%lluk (%lluk/%lluk), "),