diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-16 12:27:35 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-16 19:22:06 -0400 |
commit | 8b225b9cd8c7e6b254c637331556189572824c91 (patch) | |
tree | bb9b17a62d8895ac8d32257aff9cd9c30a8c26b7 /taint.c | |
parent | 12d9c1353b50c95a22b82c7d29fc52caed564ed8 (diff) | |
download | perl-8b225b9cd8c7e6b254c637331556189572824c91.tar.gz |
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.
Diffstat (limited to 'taint.c')
-rw-r--r-- | taint.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |