On Thu, Apr 28, 2005 at 02:44:38PM -0700, Gisle Aas ([EMAIL PROTECTED]) wrote:
>        /* look for modifiers */
>        while (patptr < patend) {
> -        const char *allowed;
> +        const char *allowed = "";
>          I32 modifier = 0;
>          switch (*patptr) {
>            case '!':

Better yet, let's localize it so it's in the default for the switch
where the others are set.  For that matter, we can move it 47 lines
south to where it's actually going to be used.

Index: pp_pack.c
===================================================================
--- pp_pack.c   (revision 124)
+++ pp_pack.c   (working copy)
@@ -940,7 +940,6 @@
 {
   const char* patptr = symptr->patptr;
   const char* patend = symptr->patend;
-  const char *allowed = "";
 
   symptr->flags &= ~FLAG_SLASH;
 
@@ -987,7 +986,8 @@
 
       /* look for modifiers */
       while (patptr < patend) {
-        I32 modifier = 0;
+        const char *allowed;
+        I32 modifier;
         switch (*patptr) {
           case '!':
             modifier = TYPE_IS_SHRIEKING;
@@ -1004,6 +1004,8 @@
             break;
 #endif /* PERL_PACK_CAN_BYTEORDER */
           default:
+            allowed = "";
+            modifier = 0;
             break;
         }
 
-- 
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance

Reply via email to