From: Vincenzo Frascino <[email protected]> The use of ptrdiff_t can trigger a warning.
Replace it with intptr_t that does not require provenance since being an integer is always valid. Signed-off-by: Vincenzo Frascino <[email protected]> Reviewed-by: Steve Capper <[email protected]> Signed-off-by: Steve Capper <[email protected]> --- coreutils/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/printf.c b/coreutils/printf.c index 2e672d15f..88bfc22e0 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -233,7 +233,7 @@ static void print_direc(char *format, unsigned fmt_length, case 's': /* Are char* and long long the same? */ if (sizeof(argument) == sizeof(llv)) { - llv = (long long)(ptrdiff_t)argument; + llv = (long long)(intptr_t)argument; goto print_long; } else { /* Hope compiler will optimize it out by moving call -- 2.35.1 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
