Sun Studio lint patches
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index fafd82e..f11ed32 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -288,7 +288,7 @@ S_tokereport(pTHX_ I32 rv)
 {
     dVAR;
     if (DEBUG_T_TEST) {
-       const char *name = Nullch;
+       const char *name = NULL;
        enum token_type type = TOKENTYPE_NONE;
        const struct debug_tokens *p;
        SV* const report = newSVpvs("<== ");
@@ -605,8 +605,8 @@ Perl_lex_start(pTHX_ SV *line)
     *PL_lex_casestack = '\0';
     PL_lex_dojoin = 0;
     PL_lex_starts = 0;
-    PL_lex_stuff = Nullsv;
-    PL_lex_repl = Nullsv;
+    PL_lex_stuff = NULL;
+    PL_lex_repl = NULL;
     PL_lex_inpat = 0;
     PL_nexttoke = 0;
     PL_lex_inwhat = 0;
@@ -623,7 +623,7 @@ Perl_lex_start(pTHX_ SV *line)
     SvTEMP_off(PL_linestr);
     PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = SvPVX(PL_linestr);
     PL_bufend = PL_bufptr + SvCUR(PL_linestr);
-    PL_last_lop = PL_last_uni = Nullch;
+    PL_last_lop = PL_last_uni = NULL;
     PL_rsfp = 0;
 }
 
@@ -786,7 +786,7 @@ S_skipspace(pTHX_ register char *s)
 
        /* try to recharge the buffer */
        if ((s = filter_gets(PL_linestr, PL_rsfp,
-                            (prevlen = SvCUR(PL_linestr)))) == Nullch)
+                            (prevlen = SvCUR(PL_linestr)))) == NULL)
        {
            /* end of file.  Add on the -p or -n magic */
            if (PL_minus_p) {
@@ -805,7 +805,7 @@ S_skipspace(pTHX_ register char *s)
            PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = s = PL_linestart
                = SvPVX(PL_linestr);
            PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-           PL_last_lop = PL_last_uni = Nullch;
+           PL_last_lop = PL_last_uni = NULL;
 
            /* Close the filehandle.  Could be from -P preprocessor,
             * STDIN, or a regular file.  If we were reading code from
@@ -1083,7 +1083,7 @@ STATIC char *
 S_force_version(pTHX_ char *s, int guessing)
 {
     dVAR;
-    OP *version = Nullop;
+    OP *version = NULL;
     char *d;
 
     s = skipspace(s);
@@ -1206,7 +1206,7 @@ S_sublex_start(pTHX)
 
     if (op_type == OP_NULL) {
        yylval.opval = PL_lex_op;
-       PL_lex_op = Nullop;
+       PL_lex_op = NULL;
        return THING;
     }
     if (op_type == OP_CONST || op_type == OP_READLINE) {
@@ -1223,7 +1223,7 @@ S_sublex_start(pTHX)
            sv = nsv;
        }
        yylval.opval = (OP*)newSVOP(op_type, 0, sv);
-       PL_lex_stuff = Nullsv;
+       PL_lex_stuff = NULL;
        /* Allow <FH> // "foo" */
        if (op_type == OP_READLINE)
            PL_expect = XTERMORDORDOR;
@@ -1238,7 +1238,7 @@ S_sublex_start(pTHX)
     PL_expect = XTERM;
     if (PL_lex_op) {
        yylval.opval = PL_lex_op;
-       PL_lex_op = Nullop;
+       PL_lex_op = NULL;
        return PMFUNC;
     }
     else
@@ -1280,12 +1280,12 @@ S_sublex_push(pTHX)
     SAVEGENERICPV(PL_lex_casestack);
 
     PL_linestr = PL_lex_stuff;
-    PL_lex_stuff = Nullsv;
+    PL_lex_stuff = NULL;
 
     PL_bufend = PL_bufptr = PL_oldbufptr = PL_oldoldbufptr = PL_linestart
        = SvPVX(PL_linestr);
     PL_bufend += SvCUR(PL_linestr);
-    PL_last_lop = PL_last_uni = Nullch;
+    PL_last_lop = PL_last_uni = NULL;
     SAVEFREESV(PL_linestr);
 
     PL_lex_dojoin = FALSE;
@@ -1302,7 +1302,7 @@ S_sublex_push(pTHX)
     if (PL_lex_inwhat == OP_MATCH || PL_lex_inwhat == OP_QR || PL_lex_inwhat == OP_SUBST)
        PL_lex_inpat = PL_sublex_info.sub_op;
     else
-       PL_lex_inpat = Nullop;
+       PL_lex_inpat = NULL;
 
     return '(';
 }
@@ -1336,7 +1336,7 @@ S_sublex_done(pTHX)
        PL_lex_inpat = 0;
        PL_bufend = PL_bufptr = PL_oldbufptr = PL_oldoldbufptr = PL_linestart = SvPVX(PL_linestr);
        PL_bufend += SvCUR(PL_linestr);
-       PL_last_lop = PL_last_uni = Nullch;
+       PL_last_lop = PL_last_uni = NULL;
        SAVEFREESV(PL_linestr);
        PL_lex_dojoin = FALSE;
        PL_lex_brackets = 0;
@@ -1353,7 +1353,7 @@ S_sublex_done(pTHX)
        }
        else {
            PL_lex_state = LEX_INTERPCONCAT;
-           PL_lex_repl = Nullsv;
+           PL_lex_repl = NULL;
        }
        return ',';
     }
@@ -1788,8 +1788,8 @@ S_scan_const(pTHX_ char *start)
                        goto NUM_ESCAPE_INSERT;
                    }
                    res = newSVpvn(s + 1, e - s - 1);
-                   res = new_constant( Nullch, 0, "charnames",
-                                       res, Nullsv, "\\N{...}" );
+                   res = new_constant( NULL, 0, "charnames",
+                                       res, NULL, "\\N{...}" );
                    if (has_utf8)
                        sv_utf8_upgrade(res);
                    str = SvPV_const(res,len);
@@ -1893,15 +1893,15 @@ S_scan_const(pTHX_ char *start)
           and then encode the next character */
        if ((has_utf8 || this_utf8) && !NATIVE_IS_INVARIANT((U8)(*s))) {
            STRLEN len  = 1;
-           const UV uv       = (this_utf8) ? utf8n_to_uvchr((U8*)s, send - s, &len, 0) : (UV) ((U8) *s);
-           const STRLEN need = UNISKIP(NATIVE_TO_UNI(uv));
+           const UV nextuv   = (this_utf8) ? utf8n_to_uvchr((U8*)s, send - s, &len, 0) : (UV) ((U8) *s);
+           const STRLEN need = UNISKIP(NATIVE_TO_UNI(nextuv));
            s += len;
            if (need > len) {
                /* encoded value larger than old, need extra space (NOTE: SvCUR() not set here) */
                const STRLEN off = d - SvPVX_const(sv);
                d = SvGROW(sv, SvLEN(sv) + (need-len)) + off;
            }
-           d = (char*)uvchr_to_utf8((U8*)d, uv);
+           d = (char*)uvchr_to_utf8((U8*)d, nextuv);
            has_utf8 = TRUE;
        }
        else {
@@ -1938,7 +1938,7 @@ S_scan_const(pTHX_ char *start)
     if (s > PL_bufptr) {
        if ( PL_hints & ( PL_lex_inpat ? HINT_NEW_RE : HINT_NEW_STRING ) )
            sv = new_constant(start, s - start, (PL_lex_inpat ? "qr" : "q"),
-                             sv, Nullsv,
+                             sv, NULL,
                              ( PL_lex_inwhat == OP_TRANS
                                ? "tr"
                                : ( (PL_lex_inwhat == OP_SUBST && !PL_lex_inpat)
@@ -2239,7 +2239,7 @@ Perl_filter_add(pTHX_ filter_t funcp, SV *datasv)
 {
     dVAR;
     if (!funcp)
-       return Nullsv;
+       return NULL;
 
     if (!PL_rsfp_filters)
        PL_rsfp_filters = newAV();
@@ -2356,7 +2356,7 @@ S_filter_gets(pTHX_ register SV *sv, register PerlIO *fp, STRLEN append)
         if (FILTER_READ(0, sv, 0) > 0)
             return ( SvPVX(sv) ) ;
         else
-           return Nullch ;
+           return NULL ;
     }
     else
         return (sv_gets(sv, fp, append));
@@ -2399,7 +2399,7 @@ S_tokenize_use(pTHX_ int is_use, char *s) {
     if (isDIGIT(*s) || (*s == 'v' && isDIGIT(s[1]))) {
        s = force_version(s, TRUE);
        if (*s == ';' || (s = skipspace(s), *s == ';')) {
-           PL_nextval[PL_nexttoke].opval = Nullop;
+           PL_nextval[PL_nexttoke].opval = NULL;
            force_next(WORD);
        }
        else if (*s == 'v') {
@@ -2622,7 +2622,7 @@ Perl_yylex(pTHX)
        {
            if (PL_bufptr != PL_bufend)
                Perl_croak(aTHX_ "Bad evalled substitution pattern");
-           PL_lex_repl = Nullsv;
+           PL_lex_repl = NULL;
        }
        /* FALLTHROUGH */
     case LEX_INTERPCONCAT:
@@ -2758,7 +2758,7 @@ Perl_yylex(pTHX)
            sv_catpvs(PL_linestr, "\n");
            PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
            PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-           PL_last_lop = PL_last_uni = Nullch;
+           PL_last_lop = PL_last_uni = NULL;
            if (PERLDB_LINE && PL_curstash != PL_debstash) {
                SV * const sv = newSV(0);
 
@@ -2772,7 +2772,7 @@ Perl_yylex(pTHX)
        }
        do {
            bof = PL_rsfp ? TRUE : FALSE;
-           if ((s = filter_gets(PL_linestr, PL_rsfp, 0)) == Nullch) {
+           if ((s = filter_gets(PL_linestr, PL_rsfp, 0)) == NULL) {
              fake_eof:
                if (PL_rsfp) {
                    if (PL_preprocess && !PL_in_eval)
@@ -2789,12 +2789,12 @@ Perl_yylex(pTHX)
                             ? ";}continue{print;}" : ";}");
                    PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
                    PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-                   PL_last_lop = PL_last_uni = Nullch;
+                   PL_last_lop = PL_last_uni = NULL;
                    PL_minus_n = PL_minus_p = 0;
                    goto retry;
                }
                PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
-               PL_last_lop = PL_last_uni = Nullch;
+               PL_last_lop = PL_last_uni = NULL;
                sv_setpvn(PL_linestr,"",0);
                TOKEN(';');     /* not infinite loop because rsfp is NULL now */
            }
@@ -2839,7 +2839,7 @@ Perl_yylex(pTHX)
                    sv_setpvn(PL_linestr, "", 0);
                    PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
                    PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-                   PL_last_lop = PL_last_uni = Nullch;
+                   PL_last_lop = PL_last_uni = NULL;
                    PL_doextract = FALSE;
                }
            }
@@ -2856,13 +2856,13 @@ Perl_yylex(pTHX)
            av_store(CopFILEAVx(PL_curcop),(I32)CopLINE(PL_curcop),sv);
        }
        PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-       PL_last_lop = PL_last_uni = Nullch;
+       PL_last_lop = PL_last_uni = NULL;
        if (CopLINE(PL_curcop) == 1) {
            while (s < PL_bufend && isSPACE(*s))
                s++;
            if (*s == ':' && s[1] != ':') /* for csh execing sh scripts */
                s++;
-           d = Nullch;
+           d = NULL;
            if (!PL_in_eval) {
                if (*s == '#' && *(s+1) == '!')
                    d = s + 2;
@@ -2893,8 +2893,8 @@ Perl_yylex(pTHX)
                     * at least, set argv[0] to the basename of the Perl
                     * interpreter. So, having found "#!", we'll set it right.
                     */
-                   SV * const x
-                       = GvSV(gv_fetchpvs("\030", GV_ADD, SVt_PV)); /* $^X */
+                   SV * const x = GvSV(gv_fetchpvs("\030", GV_ADD|GV_NOTQUAL,
+                                                   SVt_PV)); /* $^X */
                    assert(SvPOK(x) || SvGMAGICAL(x));
                    if (sv_eq(x, CopFILESV(PL_curcop))) {
                        sv_setpvn(x, ipath, ipathend - ipath);
@@ -2935,7 +2935,7 @@ Perl_yylex(pTHX)
                            }
                        }
                        if (d < ipath)
-                           d = Nullch;
+                           d = NULL;
                    }
 #endif
                }
@@ -2954,7 +2954,7 @@ Perl_yylex(pTHX)
                    while (*c && !strchr("; \t\r\n\f\v#", *c))
                        c++;
                    if (c < d)
-                       d = Nullch;     /* "perl" not in first word; ignore */
+                       d = NULL;       /* "perl" not in first word; ignore */
                    else
                        *s = '#';       /* Don't try to parse shebang line */
                }
@@ -3026,7 +3026,7 @@ Perl_yylex(pTHX)
                            sv_setpvn(PL_linestr, "", 0);
                            PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
                            PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-                           PL_last_lop = PL_last_uni = Nullch;
+                           PL_last_lop = PL_last_uni = NULL;
                            PL_preambled = FALSE;
                            if (PERLDB_LINE)
                                (void)gv_fetchfile(PL_origfilename);
@@ -3127,7 +3127,7 @@ Perl_yylex(pTHX)
            case 'T': ftst = OP_FTTEXT;         break;
            case 'B': ftst = OP_FTBINARY;       break;
            case 'M': case 'A': case 'C':
-               gv_fetchpvs("\024",GV_ADD, SVt_PV);
+               gv_fetchpvs("\024", GV_ADD|GV_NOTQUAL, SVt_PV);
                switch (tmp) {
                case 'M': ftst = OP_FTMTIME;    break;
                case 'A': ftst = OP_FTATIME;    break;
@@ -3272,7 +3272,7 @@ Perl_yylex(pTHX)
            PL_expect = XTERMBLOCK;
         grabattrs:
            s = skipspace(s);
-           attrs = Nullop;
+           attrs = NULL;
            while (isIDFIRST_lazy_if(s,UTF)) {
                I32 tmp;
                d = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, &len);
@@ -3311,7 +3311,7 @@ Perl_yylex(pTHX)
                    attrs = append_elem(OP_LIST, attrs,
                                        newSVOP(OP_CONST, 0, sv));
                    SvREFCNT_dec(PL_lex_stuff);
-                   PL_lex_stuff = Nullsv;
+                   PL_lex_stuff = NULL;
                }
                else {
                    if (len == 6 && strnEQ(s, "unique", len)) {
@@ -3319,7 +3319,7 @@ Perl_yylex(pTHX)
 #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");
@@ -3846,9 +3846,9 @@ Perl_yylex(pTHX)
                            char tmpbuf[sizeof PL_tokenbuf];
                            for (t++; isSPACE(*t); t++) ;
                            if (isIDFIRST_lazy_if(t,UTF)) {
-                               STRLEN len;
+                               STRLEN dummylen;
                                t = scan_word(t, tmpbuf, sizeof tmpbuf, TRUE,
-                                             &len);
+                                             &dummylen);
                                for (; isSPACE(*t); t++) ;
                                if (*t == ';' && get_cv(tmpbuf, FALSE))
                                    Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
@@ -4225,7 +4225,7 @@ Perl_yylex(pTHX)
                    Perl_warner(aTHX_ packWARN(WARN_MISC),
                            "dump() better written as CORE::dump()");
                }
-               gv = Nullgv;
+               gv = NULL;
                gvp = 0;
                if (hgv && tmp != KEY_x && tmp != KEY_CORE
                        && ckWARN(WARN_AMBIGUOUS))      /* never ambiguous */
@@ -4292,7 +4292,7 @@ Perl_yylex(pTHX)
                             PL_tokenbuf);
                    len -= 2;
                    PL_tokenbuf[len] = '\0';
-                   gv = Nullgv;
+                   gv = NULL;
                    gvp = 0;
                }
                else {
@@ -4464,9 +4464,9 @@ Perl_yylex(pTHX)
                    PL_last_lop_op = OP_ENTERSUB;
                    /* Is there a prototype? */
                    if (SvPOK(cv)) {
-                       STRLEN len;
-                       const char *proto = SvPV_const((SV*)cv, len);
-                       if (!len)
+                       STRLEN protolen;
+                       const char *proto = SvPV_const((SV*)cv, protolen);
+                       if (!protolen)
                            TERM(FUNC0SUB);
                        if (*proto == '$' && proto[1] == '\0')
                            OPERATOR(UNIOPSUB);
@@ -4694,7 +4694,8 @@ Perl_yylex(pTHX)
            }
 
        case KEY_chdir:
-           (void)gv_fetchpvs("ENV", GV_ADD, SVt_PVHV); /* may use HOME */
+           /* may use HOME */
+           (void)gv_fetchpvs("ENV", GV_ADD|GV_NOTQUAL, SVt_PVHV);
            UNI(OP_CHDIR);
 
        case KEY_close:
@@ -5103,10 +5104,10 @@ Perl_yylex(pTHX)
                    /* [perl #16184] */
                    && !(t[0] == '=' && t[1] == '>')
                ) {
-                   int len = (int)(d-s);
+                   int parms_len = (int)(d-s);
                    Perl_warner(aTHX_ packWARN(WARN_PRECEDENCE),
                           "Precedence problem: open %.*s should be open(%.*s)",
-                           len, s, len, s);
+                           parms_len, s, parms_len, s);
                }
            }
            LOP(OP_OPEN,XTERM);
@@ -5171,7 +5172,7 @@ Perl_yylex(pTHX)
            PL_expect = XOPERATOR;
            force_next(')');
            if (SvCUR(PL_lex_stuff)) {
-               OP *words = Nullop;
+               OP *words = NULL;
                int warned = 0;
                d = SvPV_force(PL_lex_stuff, len);
                while (len) {
@@ -5210,7 +5211,7 @@ Perl_yylex(pTHX)
            }
            if (PL_lex_stuff) {
                SvREFCNT_dec(PL_lex_stuff);
-               PL_lex_stuff = Nullsv;
+               PL_lex_stuff = NULL;
            }
            PL_expect = XTERM;
            TOKEN('(');
@@ -5534,7 +5535,7 @@ Perl_yylex(pTHX)
                if (have_proto) {
                    PL_nextval[PL_nexttoke].opval =
                        (OP*)newSVOP(OP_CONST, 0, PL_lex_stuff);
-                   PL_lex_stuff = Nullsv;
+                   PL_lex_stuff = NULL;
                    force_next(THING);
                }
                if (!have_name) {
@@ -5668,10 +5669,11 @@ Perl_yylex(pTHX)
            char ctl_l[2];
            ctl_l[0] = toCTRL('L');
            ctl_l[1] = '\0';
-           gv_fetchpvn_flags(ctl_l, 1, GV_ADD, SVt_PV);
+           gv_fetchpvn_flags(ctl_l, 1, GV_ADD|GV_NOTQUAL, SVt_PV);
        }
 #else
-           gv_fetchpvs("\f", GV_ADD, SVt_PV);  /* Make sure $^L is defined */
+           /* Make sure $^L is defined */
+           gv_fetchpvs("\f", GV_ADD|GV_NOTQUAL, SVt_PV);
 #endif
            UNI(OP_ENTERWRITE);
 
@@ -9624,7 +9626,7 @@ S_scan_subst(pTHX_ char *start)
     if (!s) {
        if (PL_lex_stuff) {
            SvREFCNT_dec(PL_lex_stuff);
-           PL_lex_stuff = Nullsv;
+           PL_lex_stuff = NULL;
        }
        Perl_croak(aTHX_ "Substitution replacement not terminated");
     }
@@ -9692,7 +9694,7 @@ S_scan_trans(pTHX_ char *start)
     if (!s) {
        if (PL_lex_stuff) {
            SvREFCNT_dec(PL_lex_stuff);
-           PL_lex_stuff = Nullsv;
+           PL_lex_stuff = NULL;
        }
        Perl_croak(aTHX_ "Transliteration replacement not terminated");
     }
@@ -9867,7 +9869,7 @@ S_scan_heredoc(pTHX_ register char *s)
        sv_setsv(PL_linestr,herewas);
        PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = s = PL_linestart = SvPVX(PL_linestr);
        PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-       PL_last_lop = PL_last_uni = Nullch;
+       PL_last_lop = PL_last_uni = NULL;
     }
     else
        sv_setpvn(tmpstr,"",0);   /* avoid "uninitialized" warning */
@@ -9879,7 +9881,7 @@ S_scan_heredoc(pTHX_ register char *s)
        }
        CopLINE_inc(PL_curcop);
        PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-       PL_last_lop = PL_last_uni = Nullch;
+       PL_last_lop = PL_last_uni = NULL;
 #ifndef PERL_STRICT_CR
        if (PL_bufend - PL_linestart >= 2) {
            if ((PL_bufend[-2] == '\r' && PL_bufend[-1] == '\n') ||
@@ -10016,7 +10018,7 @@ S_scan_inputsymbol(pTHX_ char *start)
            Copy("ARGV",d,5,char);
 
        /* Check whether readline() is overriden */
-       gv_readline = gv_fetchpvs("readline", 0, SVt_PVCV);
+       gv_readline = gv_fetchpvs("readline", GV_NOTQUAL, SVt_PVCV);
        if ((gv_readline
                && GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline))
                ||
@@ -10364,25 +10366,25 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
         !(PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = filter_gets(PL_linestr, PL_rsfp, 0))) {
            sv_free(sv);
            CopLINE_set(PL_curcop, (line_t)PL_multi_start);
-           return Nullch;
+           return NULL;
        }
        /* we read a line, so increment our line counter */
        CopLINE_inc(PL_curcop);
 
        /* update debugger info */
        if (PERLDB_LINE && PL_curstash != PL_debstash) {
-           SV * const sv = newSV(0);
+           SV * const line_sv = newSV(0);
 
-           sv_upgrade(sv, SVt_PVMG);
-           sv_setsv(sv,PL_linestr);
-            (void)SvIOK_on(sv);
-            SvIV_set(sv, 0);
-           av_store(CopFILEAVx(PL_curcop), (I32)CopLINE(PL_curcop), sv);
+           sv_upgrade(line_sv, SVt_PVMG);
+           sv_setsv(line_sv,PL_linestr);
+           (void)SvIOK_on(line_sv);
+           SvIV_set(line_sv, 0);
+           av_store(CopFILEAVx(PL_curcop), (I32)CopLINE(PL_curcop), line_sv);
        }
 
        /* having changed the buffer, we must update PL_bufend */
        PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
-       PL_last_lop = PL_last_uni = Nullch;
+       PL_last_lop = PL_last_uni = NULL;
     }
 
     /* at this point, we have successfully read the delimited string */
@@ -10444,7 +10446,7 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
     register char *d;                  /* destination in temp buffer */
     register char *e;                  /* end of temp buffer */
     NV nv;                             /* number read, as a double */
-    SV *sv = Nullsv;                   /* place to put the converted number */
+    SV *sv = NULL;                     /* place to put the converted number */
     bool floatit;                      /* boolean: int or float? */
     const char *lastub = NULL;         /* position of last underbar */
     static char const number_too_long[] = "Number too long";
@@ -10628,9 +10630,9 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
            }
            if (just_zero && (PL_hints & HINT_NEW_INTEGER))
                sv = new_constant(start, s - start, "integer",
-                                 sv, Nullsv, NULL);
+                                 sv, NULL, NULL);
            else if (PL_hints & HINT_NEW_BINARY)
-               sv = new_constant(start, s - start, "binary", sv, Nullsv, NULL);
+               sv = new_constant(start, s - start, "binary", sv, NULL, NULL);
        }
        break;
 
@@ -10797,7 +10799,7 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
                       (PL_hints & HINT_NEW_INTEGER) )
            sv = new_constant(PL_tokenbuf, d - PL_tokenbuf,
                              (floatit ? "float" : "integer"),
-                             sv, Nullsv, NULL);
+                             sv, NULL, NULL);
        break;
 
     /* if it starts with a v, it could be a v-string */
@@ -10813,7 +10815,7 @@ vstring:
     if (sv)
        lvalp->opval = newSVOP(OP_CONST, 0, sv);
     else
-       lvalp->opval = Nullop;
+       lvalp->opval = NULL;
 
     return (char *)s;
 }
@@ -10875,7 +10877,7 @@ S_scan_formline(pTHX_ register char *s)
            s = filter_gets(PL_linestr, PL_rsfp, 0);
            PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = SvPVX(PL_linestr);
            PL_bufend = PL_bufptr + SvCUR(PL_linestr);
-           PL_last_lop = PL_last_uni = Nullch;
+           PL_last_lop = PL_last_uni = NULL;
            if (!s) {
                s = PL_bufptr;
                break;
@@ -10920,6 +10922,10 @@ S_set_csh(pTHX)
     dVAR;
     if (!PL_cshlen)
        PL_cshlen = strlen(PL_cshname);
+#else
+#if defined(USE_ITHREADS)
+    PERL_UNUSED_ARG(my_perl);
+#endif
 #endif
 }