From 8b225b9cd8c7e6b254c637331556189572824c91 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 16 Jun 2014 12:27:35 -0400 Subject: Use of the Uid_t_sign and casting instead of Uid_t_f. HP-UX B.11.31/64 gcc 4.7.2 with -DDEBUGGING: taint.c:38:2: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'uid_t' [-Wformat] This removes the sole use of Uid_t_f (and there are none of Gid_t_f) from the core. --- taint.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'taint.c') diff --git a/taint.c b/taint.c index 3fc62507ca..f21f5bebb9 100644 --- a/taint.c +++ b/taint.c @@ -35,9 +35,15 @@ Perl_taint_proper(pTHX_ const char *f, const char *const s) const Uid_t uid = PerlProc_getuid(); const Uid_t euid = PerlProc_geteuid(); +#if Uid_t_sign == 1 /* uid_t is unsigned. */ DEBUG_u(PerlIO_printf(Perl_debug_log, - "%s %d %"Uid_t_f" %"Uid_t_f"\n", - s, TAINT_get, uid, euid)); + "%s %d %"UVuf" %"UVuf"\n", + s, TAINT_get, (UV)uid, (UV)euid)); +#else /* uid_t is signed (Uid_t_sign == -1), or don't know. */ + DEBUG_u(PerlIO_printf(Perl_debug_log, + "%s %d %"IVdf" %"IVdf"\n", + s, TAINT_get, (IV)uid, (IV)euid)); +#endif } #endif -- cgit v1.2.1