trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r982067 - in /trafficserver/traffic/trunk: ./ libinktomi++/ proxy/mgmt2/
Date Tue, 03 Aug 2010 23:21:34 GMT
Author: zwoop
Date: Tue Aug  3 23:21:33 2010
New Revision: 982067

URL: http://svn.apache.org/viewvc?rev=982067&view=rev
Log:
TS-400: Checkpoint 1 in cleanup.

Modified:
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/libinktomi++/Diags.cc
    trafficserver/traffic/trunk/libinktomi++/List.h
    trafficserver/traffic/trunk/libinktomi++/Ptr.h
    trafficserver/traffic/trunk/libinktomi++/SimpleDBM.h
    trafficserver/traffic/trunk/libinktomi++/ink_mutex.cc
    trafficserver/traffic/trunk/libinktomi++/ink_queue.cc
    trafficserver/traffic/trunk/libinktomi++/ink_res_init.cc
    trafficserver/traffic/trunk/libinktomi++/ink_resource.cc
    trafficserver/traffic/trunk/libinktomi++/ink_time.cc
    trafficserver/traffic/trunk/libinktomi++/mkdfa.c
    trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Tue Aug  3 23:21:33 2010
@@ -442,8 +442,22 @@ base_cc=`basename $CC`
 case $host_os in
   linux*)
     if test "x${base_cc}" = "xicc"; then
-      common_opt="-pipe -Wall -wd279 -wd873" # 279 is "controlling expression is constant",
triggered by our asserts
-      debug_opt="-ggdb3 $common_opt"   # 873 is "has no corresponding operator delete". ToDo:
we should fix.
+      # -Wall goes crazy, so turned these specific checks off for now:
+      #
+      #  111 is "statement is unrecahable"
+      #  279 is "controlling expression is constant", triggered by our asserts
+      #  444 is "destructor for base class is not virtual"
+      #  522 is "function "xyz" redeclared "inline" after being called
+      #  873 is "has no corresponding operator delete". ToDo: we should fix.
+      #  981 is "operands are evaluated in unspecified order"
+      # 1418 is "external function definition with no prior declaration"
+      # 1720 is "operator new" has no corresponding member operator delete"
+      # 2256 is "non-pointer conversion from "int" to "unsigned char" "
+      # 2259 is "non-pointer conversion from "int" to "unsigned char" "
+      # 
+      # TODO: We should try to eliminate more of these -wd exclusions.
+      common_opt="-pipe -Wall -wd111 -wd279 -wd522 -wd444 -wd873 -wd981 -wd1418 -wd1720 -wd2256
-wd2259"
+      debug_opt="-ggdb3 $common_opt"
       release_opt="-g $common_opt -O2 -axsse4.2 -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"
     else # gcc

Modified: trafficserver/traffic/trunk/libinktomi++/Diags.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/Diags.cc?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/Diags.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/Diags.cc Tue Aug  3 23:21:33 2010
@@ -74,7 +74,7 @@ SrcLoc::str(char *buf, int buflen)
   }
   buf[buflen - 1] = NUL;
   return (buf);
-};
+}
 
 
 
@@ -284,7 +284,6 @@ Diags::print_va(const char *debug_tag, D
     if (diags_log_fp) {
       va_list ap_scratch;
       va_copy(ap_scratch, ap);
-      char *buffer;
       buffer = format_buf_w_ts;
       vfprintf(diags_log_fp, buffer, ap_scratch);
       {
@@ -299,7 +298,6 @@ Diags::print_va(const char *debug_tag, D
   if (config.outputs[diags_level].to_stdout) {
     va_list ap_scratch;
     va_copy(ap_scratch, ap);
-    char *buffer;
     buffer = format_buf_w_ts;
     vfprintf(stdout, buffer, ap_scratch);
     {
@@ -313,7 +311,6 @@ Diags::print_va(const char *debug_tag, D
   if (config.outputs[diags_level].to_stderr) {
     va_list ap_scratch;
     va_copy(ap_scratch, ap);
-    char *buffer;
     buffer = format_buf_w_ts;
     vfprintf(stderr, buffer, ap_scratch);
     {

Modified: trafficserver/traffic/trunk/libinktomi++/List.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/List.h?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/List.h (original)
+++ trafficserver/traffic/trunk/libinktomi++/List.h Tue Aug  3 23:21:33 2010
@@ -80,7 +80,7 @@ template <class C> class SLink {
 //
 //      Link cell for doubly-linked list of objects of type C.
 //
-template <class C> struct Link : SLink<C> {
+template <class C> struct Link : public SLink<C> {
   C *prev;
   Link() : prev(NULL) {}
 };

Modified: trafficserver/traffic/trunk/libinktomi++/Ptr.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/Ptr.h?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/Ptr.h (original)
+++ trafficserver/traffic/trunk/libinktomi++/Ptr.h Tue Aug  3 23:21:33 2010
@@ -236,7 +236,7 @@ struct ForceVFPTToTop
 // prototypical class for reference counting
 //
 ////////////////////////////////////////////////////////////////////////
-class RefCountObj:ForceVFPTToTop
+class RefCountObj: public ForceVFPTToTop
 {
 public:
   RefCountObj():m_refcount(0)

Modified: trafficserver/traffic/trunk/libinktomi++/SimpleDBM.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/SimpleDBM.h?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/SimpleDBM.h (original)
+++ trafficserver/traffic/trunk/libinktomi++/SimpleDBM.h Tue Aug  3 23:21:33 2010
@@ -62,7 +62,7 @@ typedef enum
 
 typedef enum
   {
-    SimpleDBM_Flags_READONLY = 1,
+    SimpleDBM_Flags_READONLY = 1
   } SimpleDBM_Flags;
 
 extern "C"

Modified: trafficserver/traffic/trunk/libinktomi++/ink_mutex.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_mutex.cc?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_mutex.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_mutex.cc Tue Aug  3 23:21:33 2010
@@ -32,6 +32,7 @@ x_pthread_mutexattr_t _g_mattr;
 void
 ink_ProcessMutex_init(ProcessMutex * m, const char *name)
 {
+  NOWARN_UNUSED(name);
   if (pthread_mutex_init(m, &_g_mattr.attr) != 0) {
     abort();
   }

Modified: trafficserver/traffic/trunk/libinktomi++/ink_queue.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_queue.cc?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_queue.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_queue.cc Tue Aug  3 23:21:33 2010
@@ -482,7 +482,7 @@ ink_freelists_dump_baselinerel(FILE * f)
   while (fll) {
     int a = fll->fl->allocated - fll->fl->allocated_base;
     if (a != 0) {
-      fprintf(f, " % 10d | % 10d | % 7d | % 10d | memory/%s\n",
+      fprintf(f, " % 10u | % 10u | % 7u | % 10u | memory/%s\n",
               (fll->fl->allocated - fll->fl->allocated_base) * fll->fl->type_size,
               (fll->fl->count - fll->fl->count_base) * fll->fl->type_size,
               fll->fl->count - fll->fl->count_base, fll->fl->type_size,
fll->fl->name ? fll->fl->name : "<unknown>");
@@ -503,7 +503,7 @@ ink_freelists_dump(FILE * f)
 
   fll = freelists;
   while (fll) {
-    fprintf(f, " % 10d | % 10d | % 10d | memory/%s\n",
+    fprintf(f, " % 10u | % 10u | % 10u | memory/%s\n",
             fll->fl->allocated * fll->fl->type_size,
             fll->fl->count * fll->fl->type_size, fll->fl->type_size, fll->fl->name
? fll->fl->name : "<unknown>");
     fll = fll->next;

Modified: trafficserver/traffic/trunk/libinktomi++/ink_res_init.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_res_init.cc?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_res_init.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_res_init.cc Tue Aug  3 23:21:33 2010
@@ -236,6 +236,7 @@ ink_res_getservers(ink_res_state statp, 
 static void
 ink_res_setoptions(ink_res_state statp, const char *options, const char *source)
 {
+  NOWARN_UNUSED(source);
   const char *cp = options;
   int i;
   struct __ink_res_state_ext *ext = statp->_u._ext.ext;
@@ -576,16 +577,12 @@ ink_res_init(ink_res_state statp, unsign
      conf file
      ---------------------------------------------- */
 
-  int havedef_domain = 0, havedomain_srchlst = 0;
   if (pDefDomain && '\0' != *pDefDomain && '\n' != *pDefDomain) {
 
     cp = pDefDomain;
     strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
     if ((cp = strpbrk(statp->defdname, " \t\n")) != NULL)
       *cp = '\0';
-
-    havedef_domain = 1;
-
   }
   if (pSearchList && '\0' != *pSearchList && '\n' != *pSearchList) {
 
@@ -615,7 +612,6 @@ ink_res_init(ink_res_state statp, unsign
     *cp = '\0';
     *pp++ = 0;
     havesearch = 1;
-    havedomain_srchlst = 1;
   }
 
   /* -------------------------------------------
@@ -710,7 +706,7 @@ ink_res_init(ink_res_state statp, unsign
           hints.ai_family = PF_UNSPEC;
           hints.ai_socktype = SOCK_DGRAM;	/*dummy*/
           hints.ai_flags = AI_NUMERICHOST;
-          sprintf(sbuf, "%u", NAMESERVER_PORT);
+          sprintf(sbuf, "%d", NAMESERVER_PORT);
           if (getaddrinfo(cp, sbuf, &hints, &ai) == 0 &&
               ai->ai_addrlen <= minsiz) {
             if (statp->_u._ext.ext != NULL) {

Modified: trafficserver/traffic/trunk/libinktomi++/ink_resource.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_resource.cc?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_resource.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_resource.cc Tue Aug  3 23:21:33 2010
@@ -722,18 +722,21 @@ _xfree_null(void *mem)
 void *
 _xmalloc(unsigned int size, const char *path)
 {
+  NOWARN_UNUSED(path);
   return ink_malloc(size);
 }
 
 void *
 _xrealloc(void *ptr, unsigned int size, const char *path)
 {
+  NOWARN_UNUSED(path);
   return ink_realloc(ptr, size);
 }
 
 char *
 _xstrdup(const char *str, int length, const char *path)
 {
+  NOWARN_UNUSED(path);
   char *newstr;
 
   if (likely(str)) {
@@ -758,6 +761,7 @@ typedef struct Resource Resource;
 Resource *
 res_lookup(const char *path)
 {
+  NOWARN_UNUSED(path);
   return NULL;
 }
 

Modified: trafficserver/traffic/trunk/libinktomi++/ink_time.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_time.cc?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_time.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_time.cc Tue Aug  3 23:21:33 2010
@@ -325,7 +325,7 @@ ink_time_dayrange_to_string(InkTimeDayRa
     buf[0] = '\0';
   }
 
-  snprintf(buf, bufSize, "range_start_%d_width_%d", dayrange_ptr->base, dayrange_ptr->width);
+  snprintf(buf, bufSize, "range_start_%u_width_%u", dayrange_ptr->base, dayrange_ptr->width);
   return (buf);
 }                               /* End ink_time_dayrange_to_string */
 

Modified: trafficserver/traffic/trunk/libinktomi++/mkdfa.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/mkdfa.c?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/mkdfa.c (original)
+++ trafficserver/traffic/trunk/libinktomi++/mkdfa.c Tue Aug  3 23:21:33 2010
@@ -62,6 +62,7 @@ struct _transition_t
 };
 
 
+// TODO: Are these forward declarations really necessary?
 state_t *mkstate(void);
 transition_t *mktransition(void);
 void prstate(state_t * state);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h?rev=982067&r1=982066&r2=982067&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h Tue Aug  3 23:21:33 2010
@@ -54,7 +54,7 @@ typedef enum
   INK_COUNTER = 3,
   INK_STAT_CONST = 4,           // Added for the StatProcessor
   INK_STAT_FX = 5,              // Added for the StatProcessor
-  MAX_MGMT_TYPE = 6,
+  MAX_MGMT_TYPE = 6
 } MgmtType;
 
 /*



Mime
View raw message