yichenluan commented on a change in pull request #140: Fix build warnings in
namespace util
URL:
https://github.com/apache/rocketmq-client-cpp/pull/140#discussion_r282458576
##########
File path: src/common/NameSpaceUtil.cpp
##########
@@ -28,7 +28,7 @@ bool NameSpaceUtil::isEndPointURL(string nameServerAddr) {
}
string NameSpaceUtil::formatNameServerURL(string nameServerAddr) {
- int index = nameServerAddr.find(ENDPOINT_PREFIX);
+ unsigned int index = nameServerAddr.find(ENDPOINT_PREFIX);
Review comment:
BUG !!!
when there is no ENDPOINT_PREFIX in nameServerAddr, index will equal to
0xffffffff,
that means never equal to string::npos.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services