]> git.ipfire.org Git - thirdparty/util-linux.git/commit
cfdisk: fix compiler warnings, follow-up 7085f1e4 (#636)
authorRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 24 May 2018 13:52:01 +0000 (15:52 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Jul 2018 13:48:13 +0000 (15:48 +0200)
commit799b5d6411cbbfef320b557cd22a76ce7332df4a
tree1dd957a2d992c2abbe1f8608d07713aa7e57b61a
parent199ef37b62a4a68373404464030d4f52557fe333
cfdisk: fix compiler warnings, follow-up 7085f1e4 (#636)

Seen on OSX 10.13, xcode 9.3.

 disk-utils/cfdisk.c:1860:45: error: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
         DBG(UI, ul_debug("get_size (default=%ju)", *res));
                                             ~~~    ^~~~
                                             %llu
 disk-utils/cfdisk.c:267:60: note: expanded from macro 'DBG'
 #define DBG(m, x)       __UL_DBG(cfdisk, CFDISK_DEBUG_, m, x)
                                                           ^
 ./include/debug.h:67:4: note: expanded from macro '__UL_DBG'
                         x; \
                         ^
 disk-utils/cfdisk.c:1889:25: error: incompatible pointer types passing 'uint64_t *' (aka 'unsigned long long *') to parameter of type 'uintmax_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
                         rc = parse_size(buf, &user, &pwr);      /* parse */
                                              ^~~~~
 ./include/strutils.h:15:51: note: passing argument to parameter 'res' here
 extern int parse_size(const char *str, uintmax_t *res, int *power);
                                                   ^
 2 errors generated.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
disk-utils/cfdisk.c