diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-13 18:21:30 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-13 18:21:30 +0300 |
commit | b811c6ecc74cc1421eedc92573447768d1eb7980 (patch) | |
tree | cbc5d2a9b6e5e86d7fea274c66bf1c62a38d8ebe /sql/sql_yacc_ora.yy | |
parent | 4bd56a697ff2d2edc230a82dbfcf4412ef0996df (diff) | |
download | mariadb-git-b811c6ecc74cc1421eedc92573447768d1eb7980.tar.gz |
Fix GCC 10.2.0 -Og -Wmaybe-uninitialized
Fix some more cases after merging
commit 31aef3ae99dff6b7154cf288b3dc508d367f19f8.
Some warnings look possibly genuine, others are clearly bogus.
Diffstat (limited to 'sql/sql_yacc_ora.yy')
-rw-r--r-- | sql/sql_yacc_ora.yy | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index a1eb74771ef..a4ee6d725e3 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -4205,9 +4205,10 @@ sp_fetch_list: LEX *lex= Lex; sp_head *sp= lex->sphead; sp_pcontext *spc= lex->spcont; - sp_variable *spv; - - if (unlikely(!spc || !(spv = spc->find_variable(&$1, false)))) + sp_variable *spv= likely(spc != NULL) + ? spc->find_variable(&$1, false) + : NULL; + if (unlikely(!spv)) my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), $1.str)); /* An SP local variable */ @@ -4219,9 +4220,10 @@ sp_fetch_list: LEX *lex= Lex; sp_head *sp= lex->sphead; sp_pcontext *spc= lex->spcont; - sp_variable *spv; - - if (unlikely(!spc || !(spv = spc->find_variable(&$3, false)))) + sp_variable *spv= likely(spc != NULL) + ? spc->find_variable(&$3, false) + : NULL; + if (unlikely(!spv)) my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), $3.str)); /* An SP local variable */ |