From: Nicholas Clark Date: Sat, 25 Mar 2006 22:10:27 +0000 (+0000) Subject: Silence 3 (spurious) gcc warnings about "maybe used uninitialized". X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7087a21c096179886f18cec5311cc7e897850eef;p=p5sagit%2Fp5-mst-13.2.git Silence 3 (spurious) gcc warnings about "maybe used uninitialized". p4raw-id: //depot/perl@27607 --- diff --git a/regexec.c b/regexec.c index 523f1a2..f5fdd8d 100644 --- 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 --- 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;