trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject git commit: TS-1116 fix clang warnings
Date Fri, 24 Feb 2012 21:25:14 GMT
Updated Branches:
  refs/heads/master 999a3a6ba -> 56c29c0a1


TS-1116 fix clang warnings


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/56c29c0a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/56c29c0a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/56c29c0a

Branch: refs/heads/master
Commit: 56c29c0a1dd950eba82039f3f4dcb950a1fdff6b
Parents: 999a3a6
Author: Igor Galić <igalic@apache.org>
Authored: Fri Feb 24 22:24:12 2012 +0100
Committer: Igor Galić <igalic@apache.org>
Committed: Fri Feb 24 22:24:12 2012 +0100

----------------------------------------------------------------------
 iocore/dns/DNS.cc  |   11 +++++++----
 lib/ts/MMH.h       |    3 ++-
 proxy/CoreUtils.cc |    2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/56c29c0a/iocore/dns/DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 0611fab..ae852e1 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -856,12 +856,15 @@ inline static DNSEntry *
 get_dns(DNSHandler *h, uint16_t id)
 {
   for (DNSEntry *e = h->entries.head; e; e = (DNSEntry *) e->link.next) {
-    if (e->once_written_flag)
-      for (int j = 0; j < MAX_DNS_RETRIES; j++)
-        if (e->id[j] == id)
+    if (e->once_written_flag) {
+      for (int j = 0; j < MAX_DNS_RETRIES; j++) {
+        if (e->id[j] == id) {
           return e;
-        else if (e->id[j] < 0)
+        } else if (e->id[j] < 0) {
           goto Lnext;
+        }
+      }
+    }
   Lnext:;
   }
   return NULL;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/56c29c0a/lib/ts/MMH.h
----------------------------------------------------------------------
diff --git a/lib/ts/MMH.h b/lib/ts/MMH.h
index 130387d..c31ed89 100644
--- a/lib/ts/MMH.h
+++ b/lib/ts/MMH.h
@@ -92,7 +92,8 @@ struct MMH
 
     for (i = 0, d = MMH_str, s = (char *) (&(b[0])); i < 8; i++, *d++ = *s++);
     for (i = 0, s = (char *) (&(b[1])); i < 8; i++, *d++ = *s++);
-      return (MMH_str);
+
+    return (MMH_str);
   }
   void encodeBuffer(unsigned char *buffer, int len)
   {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/56c29c0a/proxy/CoreUtils.cc
----------------------------------------------------------------------
diff --git a/proxy/CoreUtils.cc b/proxy/CoreUtils.cc
index 9c0abca..250a95f 100644
--- a/proxy/CoreUtils.cc
+++ b/proxy/CoreUtils.cc
@@ -456,7 +456,7 @@ CoreUtils::get_base_frame(intptr_t framep, core_stack_state *coress)
   intptr_t size = arrayMem[index - 1].fsize;
   intptr_t i = 0;
 
-  memset(coress, 0, sizeof(coress));
+  memset(coress, 0, sizeof(*coress));
   D(printf("stkbase=%p\n", (void*)(vadd + size)));
   // seek to the framep offset
   if (fseek(fp, off + off2, SEEK_SET) != -1) {


Mime
View raw message