summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-10-17 12:16:40 +0100
committerDavid Mitchell <davem@iabyn.com>2014-10-17 12:23:08 +0100
commit23270f966ec4ff1b9f41f332ac6a33cf250742f9 (patch)
treee7a8bb3f2d94f306b66237d164c7cb8beb0cd37e /mg.c
parent44d6f4bb188d509de38adc221f9892c9dc684fb8 (diff)
downloadperl-23270f966ec4ff1b9f41f332ac6a33cf250742f9.tar.gz
fix some recent compiler warnings
Currently DBVARMG_SINGLE is deffed to 0, so mg->mg_private >= DBVARMG_SINGLE gives an 'always true' warning. sv_magicext's last arg is supposed to to be I32, but ARGTARG is a U32 or U64.
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index bf98374be0..4524d01eb9 100644
--- a/mg.c
+++ b/mg.c
@@ -3464,7 +3464,10 @@ int
Perl_magic_setdebugvar(pTHX_ SV *sv, MAGIC *mg) {
PERL_ARGS_ASSERT_MAGIC_SETDEBUGVAR;
- assert(mg->mg_private >= DBVARMG_SINGLE && mg->mg_private < DBVARMG_COUNT);
+#if DBVARMG_SINGLE != 0
+ assert(mg->mg_private >= DBVARMG_SINGLE);
+#endif
+ assert(mg->mg_private < DBVARMG_COUNT);
PL_DBcontrol[mg->mg_private] = SvIV_nomg(sv);
@@ -3475,7 +3478,10 @@ int
Perl_magic_getdebugvar(pTHX_ SV *sv, MAGIC *mg) {
PERL_ARGS_ASSERT_MAGIC_GETDEBUGVAR;
- assert(mg->mg_private >= DBVARMG_SINGLE && mg->mg_private < DBVARMG_COUNT);
+#if DBVARMG_SINGLE != 0
+ assert(mg->mg_private >= DBVARMG_SINGLE);
+#endif
+ assert(mg->mg_private < DBVARMG_COUNT);
sv_setiv(sv, PL_DBcontrol[mg->mg_private]);
return 0;