[perl #88776] Signedness warning in toke.c
authorDavid Mitchell <davem@iabyn.com>
Mon, 6 Jun 2011 13:02:24 +0000 (14:02 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 6 Jun 2011 13:03:58 +0000 (14:03 +0100)
fix a warning introduced by 6d51015587940c2032a6533d886163f69ca028f9

toke.c

diff --git a/toke.c b/toke.c
index 358f322..4860bd5 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -4792,12 +4792,12 @@ Perl_yylex(pTHX)
                      *(U8*)s == 0xEF ||
                      *(U8*)s >= 0xFE ||
                      s[1] == 0)) {
-               IV offset = (IV)PerlIO_tell(PL_rsfp);
-               bof = (offset == SvCUR(PL_linestr));
+               Off_t offset = (IV)PerlIO_tell(PL_rsfp);
+               bof = (offset == (Off_t)SvCUR(PL_linestr));
 #if defined(PERLIO_USING_CRLF) && defined(PERL_TEXTMODE_SCRIPTS)
                /* offset may include swallowed CR */
                if (!bof)
-                   bof = (offset == SvCUR(PL_linestr)+1);
+                   bof = (offset == (Off_t)SvCUR(PL_linestr)+1);
 #endif
                if (bof) {
                    PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);