From: Jarkko Hietaniemi Date: Mon, 7 Jan 2002 23:40:15 +0000 (+0000) Subject: Extension nits found by -Wall (several from threads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=20d7225961318f2b7028b6ce66a378dd14d15ef1;p=p5sagit%2Fp5-mst-13.2.git Extension nits found by -Wall (several from threads and threads::shared, but leaving them to Arthur). p4raw-id: //depot/perl@14128 --- diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index e35cfeb..7bfb7a3 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -503,7 +503,7 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, 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); diff --git a/ext/Devel/PPPort/PPPort.pm b/ext/Devel/PPPort/PPPort.pm index eef2512..a899b77 100644 --- a/ext/Devel/PPPort/PPPort.pm +++ b/ext/Devel/PPPort/PPPort.pm @@ -229,7 +229,7 @@ __DATA__; * 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 diff --git a/ext/Devel/PPPort/PPPort.xs b/ext/Devel/PPPort/PPPort.xs index b50dab7..99f2255 100644 --- a/ext/Devel/PPPort/PPPort.xs +++ b/ext/Devel/PPPort/PPPort.xs @@ -50,7 +50,7 @@ test4() CODE: { SV * sv = newSViv(1); - SV * rv = newRV_inc(sv); + newRV_inc(sv); RETVAL = (SvREFCNT(sv) == 2); } OUTPUT: @@ -61,7 +61,7 @@ test5() CODE: { SV * sv = newSViv(2); - SV * rv = newRV_noinc(sv); + newRV_noinc(sv); RETVAL = (SvREFCNT(sv) == 1); } OUTPUT: diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs index c55fd00..20b6319 100644 --- a/ext/List/Util/Util.xs +++ b/ext/List/Util/Util.xs @@ -276,7 +276,7 @@ CODE: 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 ; ) { diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs index 4ef1347..8026964 100644 --- a/ext/Opcode/Opcode.xs +++ b/ext/Opcode/Opcode.xs @@ -380,7 +380,6 @@ CODE: SV *bitspec, *opset; char *bitmap; STRLEN len, on; - dMY_CXT; opset = sv_2mortal(new_opset(aTHX_ Nullsv)); bitmap = SvPVX(opset); diff --git a/ext/Unicode/Normalize/Normalize.xs b/ext/Unicode/Normalize/Normalize.xs index b793907..7adad7e 100644 --- a/ext/Unicode/Normalize/Normalize.xs +++ b/ext/Unicode/Normalize/Normalize.xs @@ -328,7 +328,7 @@ compose(arg) } } 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++; } diff --git a/ext/Unicode/Normalize/mkheader b/ext/Unicode/Normalize/mkheader index 4283810..5793e4a 100644 --- a/ext/Unicode/Normalize/mkheader +++ b/ext/Unicode/Normalize/mkheader @@ -188,11 +188,11 @@ print "bool isExclusion (UV uv) \n{\nreturn\n\t"; 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"; diff --git a/x2p/str.c b/x2p/str.c index 2d44e2f..0848989 100644 --- a/x2p/str.c +++ b/x2p/str.c @@ -55,7 +55,7 @@ str_2num(register STR *str) 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; }