diff options
author | Gisle Aas <gisle@activestate.com> | 2006-01-11 14:23:28 +0000 |
---|---|---|
committer | Gisle Aas <gisle@activestate.com> | 2006-01-11 14:23:28 +0000 |
commit | cd70abae37f0090fad1d3fa318844341095d33b2 (patch) | |
tree | 060050e4f749dd351ac91c1ea5c9e82fca16da7b /mg.c | |
parent | f17da991d5d231186716de62f58f20d664f2872c (diff) | |
download | perl-cd70abae37f0090fad1d3fa318844341095d33b2.tar.gz |
Get rid of the following gcc format warnings by simplifying the
getgroups implementation:
mg.c: In function Perl_magic_get':
mg.c:1008: warning: long unsigned int format, gid_t arg (arg 3)
mg.c:1014: warning: long unsigned int format, gid_t arg (arg 3)
mg.c:1025: warning: long unsigned int format, unsigned int arg (arg 3)
Since we already cast the numeric Gid_t values to an IV it should not
be too risky to also cast the Group_t values. Converting these values
with Gid_t_f wasn't quite right anyway.
p4raw-id: //depot/perl@26786
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -1004,15 +1004,9 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) break; case '(': sv_setiv(sv, (IV)PL_gid); -#ifdef HAS_GETGROUPS - Perl_sv_setpvf(aTHX_ sv, "%"Gid_t_f, PL_gid); -#endif goto add_groups; case ')': sv_setiv(sv, (IV)PL_egid); -#ifdef HAS_GETGROUPS - Perl_sv_setpvf(aTHX_ sv, "%"Gid_t_f, PL_egid); -#endif add_groups: #ifdef HAS_GETGROUPS { @@ -1021,12 +1015,12 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) Newx(gary, num_groups, Groups_t); num_groups = getgroups(num_groups, gary); while (--num_groups >= 0) - Perl_sv_catpvf(aTHX_ sv, " %"Gid_t_f, - gary[num_groups]); + Perl_sv_catpvf(aTHX_ sv, " %"IVdf, + (IV)gary[num_groups]); Safefree(gary); } -#endif (void)SvIOK_on(sv); /* what a wonderful hack! */ +#endif break; #ifndef MACOS_TRADITIONAL case '0': |