From 1488e24a340333d4ddc954643b9cfd56849b45a4 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 12 Sep 2012 20:21:21 +0200 Subject: connectivity: fix some "empty body" warnings on Mac Change-Id: I832b369d87da9b622759bf7ddd14f95475256c38 --- .../source/drivers/postgresql/pq_preparedstatement.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 9c35eefc63eb..ecd333f834bb 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -170,7 +170,10 @@ static bool isOperator( char c ) static const char * operators = "<>=()!/&%.,;"; const char * w = operators; - for( ; *w && *w != c ; w ++); + while (*w && *w != c) + { + ++w; + } return *w != 0; } @@ -425,8 +428,12 @@ sal_Bool PreparedStatement::execute( ) buf.append( m_vars[vars] ); // skip to the end of the named parameter - for( ; index < str.getLength() && - ! ( isWhitespace( str[index] ) || isOperator( str[index] ) ) ; index ++ ); + while ( index < str.getLength() + && !( isWhitespace(str[index]) + || isOperator (str[index]))) + { + ++index; + } start = index; vars ++; } -- cgit