Silence 3 (spurious) gcc warnings about "maybe used uninitialized".
authorNicholas Clark <nick@ccl4.org>
Sat, 25 Mar 2006 22:10:27 +0000 (22:10 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 25 Mar 2006 22:10:27 +0000 (22:10 +0000)
p4raw-id: //depot/perl@27607

regexec.c
sv.c

index 523f1a2..f5fdd8d 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -2709,11 +2709,11 @@ S_regmatch(pTHX_ regnode *prog)
                          (OP(scan) == TRIE ? trie_utf8 : trie_uft8_fold)
                        : trie_plain;
 
-               reg_trie_data *trie; /* what trie are we using right now */
-
+               /* what trie are we using right now */
+               reg_trie_data *trie
+                   = (reg_trie_data*)PL_regdata->data[ ARG( scan ) ];
                accepted = 0; /* how many accepting states we have seen */
                result = 0;
-               trie = (reg_trie_data*)PL_regdata->data[ ARG( scan ) ];
 
                while ( state && uc <= (U8*)PL_regeol ) {
 
diff --git a/sv.c b/sv.c
index dc4bc5c..1388b46 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -5384,7 +5384,7 @@ static STRLEN
 S_sv_pos_u2b_cached(pTHX_ SV *sv, MAGIC **mgp, const U8 *const start,
                    const U8 *const send, STRLEN uoffset,
                    STRLEN uoffset0, STRLEN boffset0) {
-    STRLEN boffset;
+    STRLEN boffset = 0; /* Actually always set, but let's keep gcc happy.  */
     bool found = FALSE;
 
     assert (uoffset >= uoffset0);
@@ -5772,7 +5772,7 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp)
 {
     const U8* s;
     const STRLEN byte = *offsetp;
-    STRLEN len;
+    STRLEN len = 0; /* Actually always set, but let's keep gcc happy.  */
     STRLEN blen;
     MAGIC* mg = NULL;
     const U8* send;