Skip to content

Commit 5d02e76

Browse files
committed
Follow up commit for wl#9306, fix for compilation warnings on OSX
Description: OSX doesn't detect properly that "msgid" variable is properly initialized in one of sub-calls. Solution: Changed the source code to be better understandable for the compiler, from: while(!stop) { ... } to: do { ... } while(!stop); Reviewed-by: Andrzej Religa <[email protected]>
1 parent 0f4d2a4 commit 5d02e76

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,15 +1133,15 @@ class Command
11331133

11341134
Message_by_name::iterator iterator_msg_id = server_msgs_by_name.find(iterator_msg_name->second);
11351135

1136-
if (server_msgs_by_name.end() == iterator_msg_id)
1136+
if (server_msgs_by_name.end() == iterator_msg_id)
11371137
{
11381138
std::cout << "Invalid data in internal message list, entry not found:" << iterator_msg_name->second << "\n";
11391139
return Stop_with_failure;
11401140
}
11411141

11421142
const int expected_msg_id = iterator_msg_id->second.second;
11431143

1144-
while (!stop)
1144+
do
11451145
{
11461146
boost::scoped_ptr<mysqlx::Message> msg(context.connection()->recv_raw(msgid));
11471147
if (msg.get())
@@ -1166,6 +1166,8 @@ class Command
11661166
}
11671167
}
11681168
}
1169+
while (!stop);
1170+
11691171
variables_to_unreplace.clear();
11701172

11711173
if (Mysqlx::ServerMessages::ERROR == msgid &&

0 commit comments

Comments
 (0)