[ 
https://issues.apache.org/jira/browse/MESOS-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13905631#comment-13905631
 ] 

Bernd Mathiske commented on MESOS-1009:
---------------------------------------

This is a simple mistake in the glog library from Google. Till Toenshoff 
pointed me at a precooked solution at: 
https://code.google.com/p/google-glog/issues/detail?id=175

I have looked at the file and concluded that the suggested patch is exactly 
what should work. 

I will post a patch that adds the above/following diff to 
3rdparty/libprocess/3rdparty/glog-0.3.3.patch on review board:

diff --git a/src/demangle.cc b/src/demangle.cc
index 0daf308..1136e0d 100644
--- a/src/demangle.cc
+++ b/src/demangle.cc
@@ -167,7 +167,7 @@ static size_t StrLen(const char *str) {
 // Returns true if "str" has at least "n" characters remaining.
 static bool AtLeastNumCharsRemaining(const char *str, int n) {
   for (int i = 0; i < n; ++i) {
-    if (str == '\0') {
+    if (str[0] == '\0') {
       return false;
     }
   }
@@ -223,7 +223,7 @@ static bool ParseTwoCharToken(State *state, const char 
*two_char_token) {
 // Returns true and advances "mangled_cur" if we find any character in
 // "char_class" at "mangled_cur" position.
 static bool ParseCharClass(State *state, const char *char_class) {
-  if (state->mangled_cur == '\0') {
+  if (state->mangled_cur[0] == '\0') {
     return false;
   }
   const char *p = char_class;


> src/demangle.cc:170:13: error: comparison between pointer and integer ('const 
> char *' and 'int')
> ------------------------------------------------------------------------------------------------
>
>                 Key: MESOS-1009
>                 URL: https://issues.apache.org/jira/browse/MESOS-1009
>             Project: Mesos
>          Issue Type: Bug
>          Components: build
>         Environment: Ubuntu 13.10
>            Reporter: Vinson Lee
>
> Building with clang 3.5svn.
> src/demangle.cc:170:13: error: comparison between pointer and integer ('const 
> char *' and 'int')
>     if (str == '\0') {
>         ~~~ ^  ~~~~
> src/demangle.cc:226:26: error: comparison between pointer and integer ('const 
> char *' and 'int')
>   if (state->mangled_cur == '\0') {
>       ~~~~~~~~~~~~~~~~~~ ^  ~~~~



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to