From d37333fb86bf7ad951a6c2ed45878f7db35ee824 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Mon, 19 Jun 2006 16:42:17 +0000 Subject: INTEGRATION: CWS warnings01 (1.4.8); FILE MERGED 2006/05/23 19:08:06 sb 1.4.8.4: RESYNC: (1.7-1.8); FILE MERGED 2005/12/01 14:55:57 ab 1.4.8.3: #i53898# Removed warnings for unxlngi6 2005/11/07 17:34:23 pl 1.4.8.2: RESYNC: (1.4-1.7); FILE MERGED 2005/11/07 12:02:45 ab 1.4.8.1: #i53898# Removed warnings --- basic/source/comp/loops.cxx | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'basic/source/comp/loops.cxx') diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index f500954b06af..ea61af8ecec8 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -4,9 +4,9 @@ * * $RCSfile: loops.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: vg $ $Date: 2006-04-07 14:02:06 $ + * last change: $Author: hr $ $Date: 2006-06-19 17:42:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -34,14 +34,13 @@ ************************************************************************/ #include "sbcomp.hxx" -#pragma hdrstop // Single-line IF und Multiline IF void SbiParser::If() { USHORT nEndLbl; - SbiToken eTok; + SbiToken eTok = NIL; // Ende-Tokens ignorieren: SbiExpression aCond( this ); aCond.Gen(); @@ -163,7 +162,6 @@ void SbiParser::NoIf() void SbiParser::DoLoop() { USHORT nStartLbl = aGen.GetPC(); - USHORT nEndChain = 0; OpenBlock( DO ); SbiToken eTok = Next(); if( IsEoln( eTok ) ) @@ -323,7 +321,8 @@ void SbiParser::OnGoto() short nLbl = 0; do { - SbiToken eTok2 = Next(); // Label holen + SbiToken eTok2 = NIL; + eTok2 = Next(); // Label holen if( MayBeLabel() ) { USHORT nOff = pProc->GetLabels().Reference( aSym ); @@ -371,7 +370,7 @@ void SbiParser::Select() { TestToken( CASE ); SbiExpression aCase( this ); - SbiToken eTok; + SbiToken eTok = NIL; aCase.Gen(); aGen.Gen( _CASE ); TestEoln(); @@ -400,19 +399,19 @@ void SbiParser::Select() { if( bElse ) Error( SbERR_SYNTAX ); - SbiToken eTok = Peek(); - if( eTok == IS || ( eTok >= EQ && eTok <= GE ) ) + SbiToken eTok2 = Peek(); + if( eTok2 == IS || ( eTok2 >= EQ && eTok2 <= GE ) ) { // CASE [IS] operator expr - if( eTok == IS ) + if( eTok2 == IS ) Next(); - eTok = Peek(); - if( eTok < EQ || eTok > GE ) + eTok2 = Peek(); + if( eTok2 < EQ || eTok2 > GE ) Error( SbERR_SYNTAX ); else Next(); SbiExpression aCompare( this ); aCompare.Gen(); nTrueTarget = aGen.Gen( _CASEIS, nTrueTarget, - SbxEQ + ( eTok - EQ ) ); + SbxEQ + ( eTok2 - EQ ) ); } else { // CASE expr | expr TO expr @@ -490,7 +489,7 @@ void SbiParser::On() { // ON ERROR GOTO label|0 Next(); - bool bError = false; + bool bError_ = false; if( MayBeLabel() ) { if( eCurTok == NUMBER && !nVal ) @@ -507,9 +506,9 @@ void SbiParser::On() if( eCurTok == NUMBER && nVal == 1 ) aGen.Gen( _STDERROR ); else - bError = true; + bError_ = true; } - if( bError ) + if( bError_ ) Error( SbERR_LABEL_EXPECTED ); } else if( eCurTok == RESUME ) -- cgit v1.2.3