You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/05/09 12:16:40 UTC

[GitHub] [rocketmq-client-cpp] yichenluan commented on a change in pull request #140: Fix build warnings in namespace util

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::nps.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services