Change 29896 by [EMAIL PROTECTED] on 2007/01/20 17:47:00
Integrate:
[ 27177]
Subject: [PATCH] Sun Studio lint patches
From: [EMAIL PROTECTED] (Andy Lester)
Date: Mon, 13 Feb 2006 23:46:17 -0600
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/maint-5.8/perl/Makefile.SH#60 integrate
... //depot/maint-5.8/perl/gv.c#82 integrate
... //depot/maint-5.8/perl/hv.c#97 integrate
... //depot/maint-5.8/perl/op.c#160 integrate
... //depot/maint-5.8/perl/pad.c#57 integrate
... //depot/maint-5.8/perl/perlio.c#83 integrate
... //depot/maint-5.8/perl/pp.c#112 integrate
... //depot/maint-5.8/perl/pp_ctl.c#143 integrate
... //depot/maint-5.8/perl/pp_hot.c#111 integrate
... //depot/maint-5.8/perl/regcomp.c#79 integrate
... //depot/maint-5.8/perl/sv.c#292 integrate
... //depot/maint-5.8/perl/toke.c#134 integrate
... //depot/maint-5.8/perl/utf8.c#64 integrate
Differences ...
==== //depot/maint-5.8/perl/Makefile.SH#60 (text) ====
Index: perl/Makefile.SH
--- perl/Makefile.SH#59~29888~ 2007-01-19 13:24:46.000000000 -0800
+++ perl/Makefile.SH 2007-01-20 09:47:00.000000000 -0800
@@ -386,6 +386,8 @@
-p \
-Ncheck=%all \
-Nlevel=4 \
+ -errchk=parentheses \
+ -errhdr=%all \
-errfmt=src \
-errtags \
-erroff=E_ASSIGN_NARROW_CONV \
==== //depot/maint-5.8/perl/gv.c#82 (text) ====
Index: perl/gv.c
--- perl/gv.c#81~29809~ 2007-01-14 05:47:07.000000000 -0800
+++ perl/gv.c 2007-01-20 09:47:00.000000000 -0800
@@ -981,6 +981,7 @@
if (len > 1) {
#ifndef EBCDIC
if (*name > 'V' ) {
+ /*EMPTY*/;
/* Nothing else to do.
The compiler will probably turn the switch statement into a
branch table. Make sure we avoid even that small overhead for
@@ -1476,7 +1477,7 @@
lim = DESTROY_amg; /* Skip overloading entries. */
#ifdef PERL_DONT_CREATE_GVSV
else if (!sv) {
- /* Equivalent to !SvTRUE and !SvOK */
+ /*EMPTY*/; /* Equivalent to !SvTRUE and !SvOK */
}
#endif
else if (SvTRUE(sv))
==== //depot/maint-5.8/perl/hv.c#97 (text) ====
Index: perl/hv.c
--- perl/hv.c#96~29891~ 2007-01-19 16:30:02.000000000 -0800
+++ perl/hv.c 2007-01-20 09:47:00.000000000 -0800
@@ -2129,7 +2129,7 @@
}
/* sanity check the keys */
if (HeSVKEY(entry)) {
- /* Don't know what to check on SV keys. */
+ /*EMPTY*/ /* Don't know what to check on SV keys. */
} else if (HeKUTF8(entry)) {
withflags++;
if (HeKWASUTF8(entry)) {
==== //depot/maint-5.8/perl/op.c#160 (text) ====
Index: perl/op.c
--- perl/op.c#159~29888~ 2007-01-19 13:24:46.000000000 -0800
+++ perl/op.c 2007-01-20 09:47:00.000000000 -0800
@@ -531,11 +531,7 @@
SvREFCNT_dec(cop->cop_warnings);
if (! specialCopIO(cop->cop_io)) {
#ifdef USE_ITHREADS
-#if 0
- STRLEN len;
- char *s = SvPV(cop->cop_io,len);
- Perl_warn(aTHX_ "io='%.*s'",(int) len,s); /* ??? --jhi */
-#endif
+ /*EMPTY*/
#else
SvREFCNT_dec(cop->cop_io);
#endif
@@ -1605,7 +1601,7 @@
/* Don't force the C<use> if we don't need it. */
SV * const * const svp = hv_fetchs(GvHVn(PL_incgv), ATTRSMODULE_PM,
FALSE);
if (svp && *svp != &PL_sv_undef)
- ; /* already in %INC */
+ /*EMPTY*/; /* already in %INC */
else
Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT,
newSVpvs(ATTRSMODULE), NULL);
@@ -2019,7 +2015,7 @@
#if 0
list(o);
#else
- ;
+ /*EMPTY*/;
#endif
else {
if ( PL_bufptr > PL_oldbufptr && PL_bufptr[-1] == ','
@@ -2977,7 +2973,7 @@
repl_has_vars = 1;
}
else if (curop->op_type == OP_PUSHRE)
- ; /* Okay here, dangerous in newASSIGNOP */
+ /*EMPTY*/; /* Okay here, dangerous in newASSIGNOP */
else
break;
}
@@ -5368,7 +5364,7 @@
const I32 type = o->op_type;
if (o->op_flags & OPf_REF) {
- /* nothing */
+ /*EMPTY*/;
}
else if (o->op_flags & OPf_KIDS && cUNOPo->op_first->op_type != OP_STUB) {
SVOP * const kid = (SVOP*)cUNOPo->op_first;
@@ -7261,6 +7257,7 @@
{
dXSARGS;
if (items != 0) {
+ /*EMPTY*/;
#if 0
Perl_croak(aTHX_ "usage: %s::%s()",
HvNAME_get(GvSTASH(CvGV(cv))), GvNAME(CvGV(cv)));
==== //depot/maint-5.8/perl/perlio.c#83 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#82~29802~ 2007-01-13 16:36:51.000000000 -0800
+++ perl/perlio.c 2007-01-20 09:47:00.000000000 -0800
@@ -2236,6 +2236,8 @@
/* Place holder for stdstreams call ??? */
#ifdef USE_THREADS
MUTEX_INIT(&PerlIO_mutex);
+#else
+ PERL_UNUSED_ARG(my_perl);
#endif
}
@@ -2474,6 +2476,7 @@
}
else {
if (f) {
+ /*EMPTY*/;
/*
* FIXME: pop layers ???
*/
@@ -2847,6 +2850,7 @@
goto set_this;
}
else {
+ /*EMPTY*/;
/* FIXME: To avoid messy error recovery if dup fails
re-use the existing stdio as though flag was not set
*/
@@ -3160,6 +3164,7 @@
return PerlSIO_fflush(stdio);
}
else {
+ /*EMPTY*/;
#if 0
/*
* FIXME: This discards ungetc() and pre-read stuff which is not
@@ -4286,6 +4291,7 @@
ptr -= cnt;
}
else {
+ /*EMPTY*/;
#if 0
/*
* Test code - delete when it works ...
==== //depot/maint-5.8/perl/pp.c#112 (text) ====
Index: perl/pp.c
--- perl/pp.c#111~29888~ 2007-01-19 13:24:46.000000000 -0800
+++ perl/pp.c 2007-01-20 09:47:00.000000000 -0800
@@ -1070,6 +1070,7 @@
bhigh = blow >> (4 * sizeof (UV));
blow &= botmask;
if (ahigh && bhigh) {
+ /*EMPTY*/;
/* eg 32 bit is at least 0x10000 * 0x10000 == 0x100000000
which is overflow. Drop to NVs below. */
} else if (!ahigh && !bhigh) {
==== //depot/maint-5.8/perl/pp_ctl.c#143 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#142~29888~ 2007-01-19 13:24:46.000000000 -0800
+++ perl/pp_ctl.c 2007-01-20 09:47:00.000000000 -0800
@@ -1776,7 +1776,7 @@
TAINT_NOT;
if (gimme == G_VOID)
- ; /* do nothing */
+ /*EMPTY*/; /* do nothing */
else if (gimme == G_SCALAR) {
if (mark < SP)
*++newsp = sv_mortalcopy(*SP);
==== //depot/maint-5.8/perl/pp_hot.c#111 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#110~29807~ 2007-01-14 05:09:22.000000000 -0800
+++ perl/pp_hot.c 2007-01-20 09:47:00.000000000 -0800
@@ -2459,7 +2459,7 @@
EXTEND_MORTAL(SP - newsp);
for (mark = newsp + 1; mark <= SP; mark++) {
if (SvTEMP(*mark))
- /* empty */ ;
+ /*EMPTY*/;
else if (SvFLAGS(*mark) & (SVs_PADTMP | SVf_READONLY))
*mark = sv_mortalcopy(*mark);
else {
==== //depot/maint-5.8/perl/regcomp.c#79 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c#78~29888~ 2007-01-19 13:24:46.000000000 -0800
+++ perl/regcomp.c 2007-01-20 09:47:00.000000000 -0800
@@ -1873,7 +1873,7 @@
again:
if (PL_regkind[(U8)OP(first)] == EXACT) {
if (OP(first) == EXACT)
- ; /* Empty, get anchored substr later. */
+ /*EMPTY*/; /* Empty, get anchored substr later. */
else if ((OP(first) == EXACTF || OP(first) == EXACTFL))
r->regstclass = first;
}
==== //depot/maint-5.8/perl/sv.c#292 (text) ====
Index: perl/sv.c
--- perl/sv.c#291~29891~ 2007-01-19 16:30:02.000000000 -0800
+++ perl/sv.c 2007-01-20 09:47:00.000000000 -0800
@@ -1988,7 +1988,7 @@
if ((NV)(SvIVX(sv)) == SvNVX(sv)) {
SvIOK_on(sv);
} else {
- /* Integer is imprecise. NOK, IOKp */
+ /*EMPTY*/; /* Integer is imprecise. NOK, IOKp */
}
/* UV will not work better than IV */
} else {
@@ -2003,7 +2003,7 @@
if ((NV)(SvUVX(sv)) == SvNVX(sv)) {
SvIOK_on(sv);
} else {
- /* Integer is imprecise. NOK, IOKp, is UV */
+ /*EMPTY*/; /* Integer is imprecise. NOK, IOKp, is UV
*/
}
}
SvIsUV_on(sv);
@@ -3187,6 +3187,7 @@
it was a const and its value changed. */
if (CvCONST(cv) && CvCONST((CV*)sref)
&& cv_const_sv(cv) == cv_const_sv((CV*)sref)) {
+ /*EMPTY*/
/* They are 2 constant subroutines generated from
the same constant. This probably means that
they are really the "same" proxy subroutine
@@ -9385,13 +9386,12 @@
switch (sv_type) {
default:
- Perl_croak(aTHX_ "Bizarre SvTYPE [%" IVdf "]",
- (IV)SvTYPE(sstr));
+ Perl_croak(aTHX_ "Bizarre SvTYPE [%" IVdf "]",
(IV)SvTYPE(sstr));
break;
case SVt_PVGV:
if (GvUNIQUE((GV*)sstr)) {
- /* Do sharing here, and fall through */
+ /*EMPTY*/; /* Do sharing here, and fall through */
}
case SVt_PVIO:
case SVt_PVFM:
@@ -9489,6 +9489,7 @@
if (IoDIRP(dstr)) {
IoDIRP(dstr) = dirp_dup(IoDIRP(dstr));
} else {
+ /*EMPTY*/;
/* IoDIRP(dstr) is already a copy of IoDIRP(sstr) */
}
}
==== //depot/maint-5.8/perl/toke.c#134 (text) ====
Index: perl/toke.c
--- perl/toke.c#133~29888~ 2007-01-19 13:24:46.000000000 -0800
+++ perl/toke.c 2007-01-20 09:47:00.000000000 -0800
@@ -3276,7 +3276,7 @@
#ifdef USE_ITHREADS
GvUNIQUE_on(cGVOPx_gv(yylval.opval));
#else
- ; /* skip to avoid loading attributes.pm */
+ /*EMPTY*/; /* skip to avoid loading
attributes.pm */
#endif
else
Perl_croak(aTHX_ "The 'unique' attribute may only
be applied to 'our' variables");
==== //depot/maint-5.8/perl/utf8.c#64 (text) ====
Index: perl/utf8.c
--- perl/utf8.c#63~29888~ 2007-01-19 13:24:46.000000000 -0800
+++ perl/utf8.c 2007-01-20 09:47:00.000000000 -0800
@@ -1996,7 +1996,7 @@
}
if (opc == '+' && otherval)
- ; /* replace with otherval */
+ /*EMPTY*/; /* replace with otherval */
else if (opc == '!' && !otherval)
otherval = 1;
else if (opc == '-' && otherval)
End of Patch.