This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new c1f4254  Fix build warnings in namespace util (#140)
c1f4254 is described below

commit c1f42546b08a6c3a0d1c5186eb07135b5f358477
Author: dinglei <[email protected]>
AuthorDate: Wed Apr 24 19:12:41 2019 +0800

    Fix build warnings in namespace util (#140)
---
 src/common/NameSpaceUtil.cpp | 2 +-
 src/common/NameSpaceUtil.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/NameSpaceUtil.cpp b/src/common/NameSpaceUtil.cpp
index 74f87a2..56f1cc4 100644
--- a/src/common/NameSpaceUtil.cpp
+++ b/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);
   if (index != string::npos) {
     LOG_DEBUG("Get Name Server from endpoint [%s]",
               nameServerAddr.substr(ENDPOINT_PREFIX_LENGTH, 
nameServerAddr.length() - ENDPOINT_PREFIX_LENGTH).c_str());
diff --git a/src/common/NameSpaceUtil.h b/src/common/NameSpaceUtil.h
index 39f5da7..1d4afcf 100644
--- a/src/common/NameSpaceUtil.h
+++ b/src/common/NameSpaceUtil.h
@@ -23,7 +23,7 @@
 using namespace std;
 
 static const string ENDPOINT_PREFIX = "http://";;
-static const int ENDPOINT_PREFIX_LENGTH = ENDPOINT_PREFIX.length();
+static const unsigned int ENDPOINT_PREFIX_LENGTH = ENDPOINT_PREFIX.length();
 namespace rocketmq {
 class NameSpaceUtil {
  public:

Reply via email to