Fix char*/unsigned char* clashes in util.c:fbm_instr and remove
Malcolm Beattie [Wed, 10 Dec 1997 18:36:26 +0000 (18:36 +0000)]
a few extraneous trailing semicolons in perlvars.h.

p4raw-id: //depot/perl@358

perlvars.h
util.c

index b58ea16..8a72312 100644 (file)
@@ -158,8 +158,8 @@ PERLVARI(Gnumeric_local,    bool,   TRUE)   /* Assume local numerics */
 #endif /* !USE_LOCALE_NUMERIC */
 
 /* constants (these are not literals to facilitate pointer comparisons) */
-PERLVARIC(GYes,                char *, "1");
-PERLVARIC(GNo,         char *, "");
-PERLVARIC(Ghexdigit,   char *, "0123456789abcdef0123456789ABCDEFx");
-PERLVARIC(Gpatleave,   char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}");
+PERLVARIC(GYes,                char *, "1")
+PERLVARIC(GNo,         char *, "")
+PERLVARIC(Ghexdigit,   char *, "0123456789abcdef0123456789ABCDEFx")
+PERLVARIC(Gpatleave,   char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}")
 
diff --git a/util.c b/util.c
index 0156375..86e148d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -871,8 +871,10 @@ fbm_instr(unsigned char *big, register unsigned char *bigend, SV *littlestr)
                                           substr => we can ignore SvVALID */
                if (multiline) {
                    char *t = "\n";
-                   if ((s = ninstr((char*)big,(char*)bigend, t, t + len)))
-                       return s;
+                   if ((s = (unsigned char*)ninstr((char*)big, (char*)bigend,
+                                                   t, t + len))) {
+                       return (char*)s;
+                   }
                }
                if (bigend > big && bigend[-1] == '\n')
                    return (char *)(bigend - 1);
@@ -912,7 +914,9 @@ fbm_instr(unsigned char *big, register unsigned char *bigend, SV *littlestr)
                && (!SvTAIL(littlestr)
                    || s == bigend
                    || s[littlelen] == '\n')) /* Automatically multiline */
-               return s;               
+           {
+               return (char*)s;
+           }
            s++;
        }
        return Nullch;