Change 14128 by jhi@alpha on 2002/01/07 23:40:15
Extension nits found by -Wall (several from threads
and threads::shared, but leaving them to Arthur).
Affected files ...
.... //depot/perl/ext/Data/Dumper/Dumper.xs#32 edit
.... //depot/perl/ext/Devel/PPPort/PPPort.pm#5 edit
.... //depot/perl/ext/Devel/PPPort/PPPort.xs#3 edit
.... //depot/perl/ext/List/Util/Util.xs#12 edit
.... //depot/perl/ext/Opcode/Opcode.xs#34 edit
.... //depot/perl/ext/Unicode/Normalize/Normalize.xs#4 edit
.... //depot/perl/ext/Unicode/Normalize/mkheader#4 edit
.... //depot/perl/x2p/str.c#14 edit
Differences ...
==== //depot/perl/ext/Data/Dumper/Dumper.xs#32 (text) ====
Index: perl/ext/Data/Dumper/Dumper.xs
--- perl/ext/Data/Dumper/Dumper.xs.~1~ Mon Jan 7 16:45:05 2002
+++ perl/ext/Data/Dumper/Dumper.xs Mon Jan 7 16:45:05 2002
@@ -503,7 +503,7 @@
if (sortkeys == &PL_sv_yes) {
keys = newAV();
(void)hv_iterinit((HV*)ival);
- while (entry = hv_iternext((HV*)ival)) {
+ while ((entry = hv_iternext((HV*)ival))) {
sv = hv_iterkeysv(entry);
SvREFCNT_inc(sv);
av_push(keys, sv);
==== //depot/perl/ext/Devel/PPPort/PPPort.pm#5 (text) ====
Index: perl/ext/Devel/PPPort/PPPort.pm
--- perl/ext/Devel/PPPort/PPPort.pm.~1~ Mon Jan 7 16:45:05 2002
+++ perl/ext/Devel/PPPort/PPPort.pm Mon Jan 7 16:45:05 2002
@@ -229,7 +229,7 @@
* special defines should be used, ppport.h can be run through Perl to check
* your source code. Simply say:
*
- * perl -x ppport.h *.c *.h *.xs foo/*.c [etc]
+ * perl -x ppport.h *.c *.h *.xs foo/bar*.c [etc]
*
* The result will be a list of patches suggesting changes that should at
* least be acceptable, if not necessarily the most efficient solution, or a
==== //depot/perl/ext/Devel/PPPort/PPPort.xs#3 (text+w) ====
Index: perl/ext/Devel/PPPort/PPPort.xs
--- perl/ext/Devel/PPPort/PPPort.xs.~1~ Mon Jan 7 16:45:05 2002
+++ perl/ext/Devel/PPPort/PPPort.xs Mon Jan 7 16:45:05 2002
@@ -50,7 +50,7 @@
CODE:
{
SV * sv = newSViv(1);
- SV * rv = newRV_inc(sv);
+ newRV_inc(sv);
RETVAL = (SvREFCNT(sv) == 2);
}
OUTPUT:
@@ -61,7 +61,7 @@
CODE:
{
SV * sv = newSViv(2);
- SV * rv = newRV_noinc(sv);
+ newRV_noinc(sv);
RETVAL = (SvREFCNT(sv) == 1);
}
OUTPUT:
==== //depot/perl/ext/List/Util/Util.xs#12 (text) ====
Index: perl/ext/List/Util/Util.xs
--- perl/ext/List/Util/Util.xs.~1~ Mon Jan 7 16:45:05 2002
+++ perl/ext/List/Util/Util.xs Mon Jan 7 16:45:05 2002
@@ -276,7 +276,7 @@
dmy_op.op_targ = 1;
PL_op = &dmy_op;
PL_curpad = (SV **)&my_pad;
- *(PL_ppaddr[OP_RAND])(aTHX);
+ (void)*(PL_ppaddr[OP_RAND])(aTHX);
PL_op = old_op;
PL_curpad = old_curpad;
for (index = items ; index > 1 ; ) {
==== //depot/perl/ext/Opcode/Opcode.xs#34 (text) ====
Index: perl/ext/Opcode/Opcode.xs
--- perl/ext/Opcode/Opcode.xs.~1~ Mon Jan 7 16:45:05 2002
+++ perl/ext/Opcode/Opcode.xs Mon Jan 7 16:45:05 2002
@@ -380,7 +380,6 @@
SV *bitspec, *opset;
char *bitmap;
STRLEN len, on;
- dMY_CXT;
opset = sv_2mortal(new_opset(aTHX_ Nullsv));
bitmap = SvPVX(opset);
==== //depot/perl/ext/Unicode/Normalize/Normalize.xs#4 (text) ====
Index: perl/ext/Unicode/Normalize/Normalize.xs
--- perl/ext/Unicode/Normalize/Normalize.xs.~1~ Mon Jan 7 16:45:05 2002
+++ perl/ext/Unicode/Normalize/Normalize.xs Mon Jan 7 16:45:05 2002
@@ -328,7 +328,7 @@
}
}
d = uvuni_to_utf8(d, uvS); /* starter (composed or not) */
- if(tmplen = t - tmp_start) { /* uncomposed combining char */
+ if((tmplen = t - tmp_start)) { /* uncomposed combining char */
t = (U8*)SvPVX(tmp);
while(tmplen--) *d++ = *t++;
}
==== //depot/perl/ext/Unicode/Normalize/mkheader#4 (text) ====
Index: perl/ext/Unicode/Normalize/mkheader
--- perl/ext/Unicode/Normalize/mkheader.~1~ Mon Jan 7 16:45:05 2002
+++ perl/ext/Unicode/Normalize/mkheader Mon Jan 7 16:45:05 2002
@@ -188,11 +188,11 @@
while(@Exclus) {
my $cur = shift @Exclus;
if(@Exclus && $cur + 1 == $Exclus[0]) {
- print "$cur <= uv && uv <= ";
+ print "($cur <= uv && uv <= ";
while(@Exclus && $cur + 1 == $Exclus[0]) {
$cur = shift @Exclus;
}
- print $cur;
+ print "$cur)";
print "\n\t|| " if @Exclus;
} else {
print "uv == $cur";
==== //depot/perl/x2p/str.c#14 (text) ====
Index: perl/x2p/str.c
--- perl/x2p/str.c.~1~ Mon Jan 7 16:45:05 2002
+++ perl/x2p/str.c Mon Jan 7 16:45:05 2002
@@ -55,7 +55,7 @@
str->str_nok = 1;
#ifdef DEBUGGING
if (debug & 32)
- fprintf(stderr,"0x%lx num(%"NVgf")\n",(unsigned long)str,str->str_nval);
+ fprintf(stderr,"0x%lx num(%g)\n",(unsigned long)str,str->str_nval);
#endif
return str->str_nval;
}
End of Patch.