summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-05 09:04:52 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-05 09:04:52 +0000
commit155aba94f677ac771761a1f510964fe5b21524ed (patch)
tree80d7d14e42ed27cbd9bafcea2c1f10a54bf150a3 /mg.c
parentb21babef0dc893282c08080aa99c4bd760e05204 (diff)
downloadperl-155aba94f677ac771761a1f510964fe5b21524ed.tar.gz
fixes for most warnings identified by gcc -Wall
p4raw-id: //depot/perl@5540
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/mg.c b/mg.c
index 904381a069..96d268bfc7 100644
--- a/mg.c
+++ b/mg.c
@@ -339,10 +339,7 @@ U32
Perl_magic_regdata_cnt(pTHX_ SV *sv, MAGIC *mg)
{
dTHR;
- register char *s;
- register I32 i;
register REGEXP *rx;
- char *t;
if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
if (mg->mg_obj) /* @+ */
@@ -387,10 +384,8 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg)
{
dTHR;
register I32 paren;
- register char *s;
register I32 i;
register REGEXP *rx;
- char *t;
switch (*mg->mg_ptr) {
case '1': case '2': case '3': case '4':
@@ -458,7 +453,6 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
register char *s;
register I32 i;
register REGEXP *rx;
- char *t;
switch (*mg->mg_ptr) {
case '\001': /* ^A */
@@ -553,7 +547,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
{
dTHR;
if (PL_lex_state != LEX_NOTPARSING)
- SvOK_off(sv);
+ (void)SvOK_off(sv);
else if (PL_in_eval)
sv_setiv(sv, 1);
else
@@ -756,7 +750,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
Perl_sv_catpvf(aTHX_ sv, " %"Gid_t_f, gary[i]);
}
#endif
- SvIOK_on(sv); /* what a wonderful hack! */
+ (void)SvIOK_on(sv); /* what a wonderful hack! */
break;
case '*':
break;
@@ -879,7 +873,7 @@ Perl_magic_set_all_env(pTHX_ SV *sv, MAGIC *mg)
STRLEN n_a;
magic_clear_all_env(sv,mg);
hv_iterinit((HV*)sv);
- while (entry = hv_iternext((HV*)sv)) {
+ while ((entry = hv_iternext((HV*)sv))) {
I32 keylen;
my_setenv(hv_iterkey(entry, &keylen),
SvPV(hv_iterval((HV*)sv, entry), n_a));
@@ -1085,7 +1079,7 @@ Perl_magic_getnkeys(pTHX_ SV *sv, MAGIC *mg)
i = HvKEYS(hv);
else {
/*SUPPRESS 560*/
- while (entry = hv_iternext(hv)) {
+ while ((entry = hv_iternext(hv))) {
i++;
}
}
@@ -1420,7 +1414,7 @@ Perl_magic_gettaint(pTHX_ SV *sv, MAGIC *mg)
{
dTHR;
TAINT_IF((mg->mg_len & 1) ||
- (mg->mg_len & 2) && mg->mg_obj == sv); /* kludge */
+ ((mg->mg_len & 2) && mg->mg_obj == sv)); /* kludge */
return 0;
}
@@ -1447,7 +1441,7 @@ Perl_magic_getvec(pTHX_ SV *sv, MAGIC *mg)
SV *lsv = LvTARG(sv);
if (!lsv) {
- SvOK_off(sv);
+ (void)SvOK_off(sv);
return 0;
}
@@ -1570,7 +1564,7 @@ Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg)
Perl_croak(aTHX_ "panic: magic_killbackrefs");
/* XXX Should we check that it hasn't changed? */
SvRV(svp[i]) = 0;
- SvOK_off(svp[i]);
+ (void)SvOK_off(svp[i]);
SvWEAKREF_off(svp[i]);
svp[i] = &PL_sv_undef;
}
@@ -2090,7 +2084,7 @@ Perl_sighandler(int sig)
CV *cv = Nullcv;
OP *myop = PL_op;
U32 flags = 0;
- I32 o_save_i = PL_savestack_ix, type;
+ I32 o_save_i = PL_savestack_ix;
XPV *tXpv = PL_Xpv;
if (PL_savestack_ix + 15 <= PL_savestack_max)