Fix for bug 5152544, remove warning from chromium port

This is a cherry-pick of http://codereview.chromium.org/8354008/
No more warnings after this is merged.

Change-Id: I788d28545e7961d0145a3f1273ce4302f8c432ad
diff --git a/base/string_split.cc b/base/string_split.cc
index 44b5d06..9af0bbc 100644
--- a/base/string_split.cc
+++ b/base/string_split.cc
@@ -53,7 +53,10 @@
 void SplitString(const std::string& str,
                  char c,
                  std::vector<std::string>* r) {
-  DCHECK(c >= 0 && c < 0x7F);
+#if CHAR_MIN < 0
+  DCHECK(c >= 0);
+#endif
+  DCHECK(c < 0x7F);
   SplitStringT(str, c, true, r);
 }
 
@@ -164,7 +167,10 @@
                          char c,
                          std::vector<std::string>* r) {
   DCHECK(IsStringUTF8(str));
-  DCHECK(c >= 0 && c < 0x7F);
+#if CHAR_MIN < 0
+  DCHECK(c >= 0);
+#endif
+  DCHECK(c < 0x7F);
   SplitStringT(str, c, false, r);
 }
 
diff --git a/net/base/dns_util.cc b/net/base/dns_util.cc
index d97d3d2..ea58e5d 100644
--- a/net/base/dns_util.cc
+++ b/net/base/dns_util.cc
@@ -60,7 +60,11 @@
   std::string ret;
 
   for (unsigned i = 0; i < domain.size() && domain[i]; i += domain[i] + 1) {
-    if (domain[i] < 0 || domain[i] > 63)
+#if CHAR_MIN < 0
+    if (domain[i] < 0)
+      return "";
+#endif
+    if (domain[i] > 63)
       return "";
 
     if (i)