MySQL Forums
Forum List  »  Connector/C++

Re: Building Connector/C++
Posted by: bahadır doğan
Date: February 15, 2009 04:14PM

I have tried the alpha relase and I got no errors with the alpha relase.I realised that I got the problems that I specified are related with the 1.0.0preview release.

But there are some warning messages in the alpha relase.For ex:
In "driver/mysql_prepared_statement.cpp:202":
The line is:

if (param_count && !param_bind->isAllSet() || mysql_stmt_bind_param(stmt, param_bind->get()) ) {
CPP_ERR("Couldn't bind");
throw sql::SQLException(mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), mysql_stmt_errno(stmt));
}

The warning message is:
warning:suggest parenthesis around && within ||

As the reference says:
http://www.cppreference.com/wiki/operator_precedence
&& has evaluated before ||

So the code must be:

if ((param_count && !param_bind->isAllSet()) || mysql_stmt_bind_param(stmt, param_bind->get()) ) {
CPP_ERR("Couldn't bind");
throw sql::SQLException(mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), mysql_stmt_errno(stmt));
}

Also there are some warning messages in the examples and also in the test classes.

Options: ReplyQuote


Subject
Views
Written By
Posted
7558
February 15, 2009 09:00AM
3635
February 15, 2009 11:14AM
3352
February 15, 2009 03:31PM
3712
February 15, 2009 03:58PM
3194
February 15, 2009 03:46PM
Re: Building Connector/C++
2559
February 15, 2009 04:14PM
3106
February 16, 2009 02:13AM
2975
February 15, 2009 04:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.