trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r982066 - in /trafficserver/traffic/trunk: ./ iocore/eventsystem/ libinktomi++/ proxy/ proxy/hdrs/ proxy/http2/remap/ proxy/mgmt2/ proxy/mgmt2/cop/ proxy/mgmt2/tools/
Date Tue, 03 Aug 2010 23:21:28 GMT
Author: zwoop
Date: Tue Aug  3 23:21:28 2010
New Revision: 982066

URL: http://svn.apache.org/viewvc?rev=982066&view=rev
Log:
TS-400: Get basic features to compile with Intel CC

Tested: Fedora Core 13 (64-bit)

This requires the addition of --disable-ccache, since I can't
get ccache to behave properly/reliably with ICC. To compile, do

    CXX='icpc'  CC='icc'  ./configure --prefix=/opt/ats --disable-ccache

Modified:
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h
    trafficserver/traffic/trunk/libinktomi++/ink_res_mkquery.cc
    trafficserver/traffic/trunk/libinktomi++/ink_time.cc
    trafficserver/traffic/trunk/proxy/InkAPI.cc
    trafficserver/traffic/trunk/proxy/InkAPITest.cc
    trafficserver/traffic/trunk/proxy/Prefetch.cc
    trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc
    trafficserver/traffic/trunk/proxy/http2/remap/UrlMapping.cc
    trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc
    trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h
    trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
    trafficserver/traffic/trunk/proxy/mgmt2/tools/ShmemClean.cc
    trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc
    trafficserver/traffic/trunk/proxy/signals.cc

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Tue Aug  3 23:21:28 2010
@@ -328,6 +328,17 @@ AC_ARG_ENABLE([posix-cap],
 AC_MSG_RESULT([$enable_posix_cap])
 
 #
+# Disable ccache explicitly (it's enabled by default, if it exists)
+#
+AC_MSG_CHECKING([whether to explicitly disable ccache])
+AC_ARG_ENABLE([ccache],
+  [AS_HELP_STRING([--disable-ccache],[Disable ccache from being used])],
+  [],
+  [enable_ccache="yes"]
+)
+AC_MSG_RESULT([$enable_ccache])
+
+#
 # Installation directories
 # For each var the following is evaluated
 # foo      Standard variable  eg. ${prefix}/foo
@@ -384,13 +395,18 @@ REAL_CFLAGS="${CFLAGS}"
 REAL_CXXFLAGS="${CXXFLAGS}"
 REAL_CCASFLAGS="${CCASFLAGS}"
 
-AC_CHECK_PROG([CCACHE],[ccache],[ccache],[])
 AC_PROG_CC
 AC_PROG_CXX
-if test "x${CCACHE}" = "xccache" ;then
- CC="$CCACHE $CC"
- CXX="$CCACHE $CXX"
+
+# Check for ccache (unless disabled explicitly)
+if test "x$enable_ccache" = "xyes"; then
+    AC_CHECK_PROG([CCACHE],[ccache],[ccache],[])
+    if test "x${CCACHE}" = "xccache"; then
+	CC="$CCACHE $CC"
+	CXX="$CCACHE $CXX"
+    fi
 fi
+
 dnl AC_PROG_SED is only avaliable in recent autoconf versions.
 dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
 ifdef([AC_PROG_SED],
@@ -425,10 +441,17 @@ base_cc=`basename $CC`
 # These are shortcuts used in combination for the compiler options below
 case $host_os in
   linux*)
-    common_opt="-pipe -Wall -Werror"
-    debug_opt="-ggdb3 $common_opt"
-    release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"
-    cxx_opt="-Wno-invalid-offsetof"
+    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.
+      release_opt="-g $common_opt -O2 -axsse4.2 -fno-strict-aliasing"
+      cxx_opt="-Wno-invalid-offsetof"
+    else # gcc
+      common_opt="-pipe -Wall -Werror"
+      debug_opt="-ggdb3 $common_opt"
+      release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"
+      cxx_opt="-Wno-invalid-offsetof"
+    fi
     ;;
   darwin*)
     common_opt="-pipe -Wall -Werror"
@@ -446,7 +469,7 @@ case $host_os in
     ATS_ADDTO(LDFLAGS, [-L/usr/local/lib])
     ;;
   solaris*)
-    if test "x${base_cc}" = "xcc" ;then
+    if test "x${base_cc}" = "xcc"; then
       common_opt="-mt -m64 -D__WORDSIZE=64" # FIXME: arch should be detected
       CCASFLAGS="-Wa,-32" # TODO: add 64bit support to atomic ops
       debug_opt="-g $common_opt"
@@ -592,7 +615,7 @@ ATS_ADDTO(CPPFLAGS, [-D$host_os_def])
 # _Here_ is where we go ahead and add the _optimizations_ to already
 #  existing CFLAGS/CXXFLAGS if some special values had been set.
 #
-if test "x${enable_debug}" = "xyes" ;then
+if test "x${enable_debug}" = "xyes"; then
   ATS_ADDTO(CFLAGS, [${cc_oflag_dbg}])
   ATS_ADDTO(CXXFLAGS, [${cxx_oflag_dbg}])
   ATS_ADDTO(CPPFLAGS, [-DDEBUG -D_DEBUG])

Modified: trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h Tue Aug  3 23:21:28 2010
@@ -366,7 +366,6 @@ new(size_t, ink_dummy_for_new * p)
 {
   return (void *) p;
 }
-
 #define ETHREAD_GET_PTR(thread, offset) ((void*)((char*)(thread)+(offset)))
 
 TS_INLINE EThread *this_ethread();

Modified: trafficserver/traffic/trunk/libinktomi++/ink_res_mkquery.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_res_mkquery.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_res_mkquery.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_res_mkquery.cc Tue Aug  3 23:21:28 2010
@@ -406,7 +406,7 @@ ink_ns_name_ntop(const u_char *src, char
  *\li	All other domains are returned in non absolute form
  */
 int
-ns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
+ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) __THROW
 {
 	const u_char *cp;
 	char *dn, *eom;

Modified: trafficserver/traffic/trunk/libinktomi++/ink_time.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_time.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_time.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_time.cc Tue Aug  3 23:21:28 2010
@@ -22,13 +22,10 @@
  */
 
 /****************************************************************************
-
   ink_time.c
 
   Timing routines for libinktomi.a.
 
-
-
  ****************************************************************************/
 
 #include "ink_platform.h"
@@ -37,9 +34,9 @@
 #include "ink_assert.h"
 #include "ink_string.h"
 #include "ink_unused.h"
-#include <locale.h>
 
-int getrusage(int who, struct rusage *rusage);
+#include <locale.h>
+#include <sys/resource.h>
 
 /*===========================================================================*
 
@@ -48,11 +45,9 @@ int getrusage(int who, struct rusage *ru
  *===========================================================================*/
 
 /*---------------------------------------------------------------------------*
-
   uint64 microseconds(which)
 
   returns microsecond-resolution clock info
-
  *---------------------------------------------------------------------------*/
 
 uint64
@@ -120,7 +115,6 @@ ink_time_wall_seconds()
   over a string), otherwise 0 is returned.
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_gmt_string_to_tm(char *string, struct tm *bdt)
 {
@@ -170,7 +164,6 @@ ink_time_gmt_string_to_tm(char *string, 
   returned on success, else 0.
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_gmt_tm_to_rfc1123_string(struct tm *t, char *string, int maxsize)
 {
@@ -194,7 +187,6 @@ ink_time_gmt_tm_to_rfc1123_string(struct
   InkTimeDayID <dayid>, representing an integer number of days since a base.
 
  *---------------------------------------------------------------------------*/
-
 InkTimeDayID
 ink_time_tm_to_dayid(struct tm * t)
 {
@@ -215,7 +207,6 @@ ink_time_tm_to_dayid(struct tm * t)
   pointer <fp>.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_dump_dayid(FILE * fp, InkTimeDayID dayid)
 {
@@ -234,7 +225,6 @@ ink_time_dump_dayid(FILE * fp, InkTimeDa
   of days since a base, and computes a broken-down time <t>.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_dayid_to_tm(InkTimeDayID dayid, struct tm *t)
 {
@@ -253,7 +243,6 @@ ink_time_dayid_to_tm(InkTimeDayID dayid,
   an InkTimeDayRange object of width <width> that spans the day in question.
 
  *---------------------------------------------------------------------------*/
-
 InkTimeDayRange
 ink_time_dayid_to_dayrange(InkTimeDayID dayid, unsigned int width)
 {
@@ -290,7 +279,6 @@ ink_time_dayid_to_dayrange(InkTimeDayID 
   original space of days.
 
  *---------------------------------------------------------------------------*/
-
 InkTimeDayRange
 ink_time_chomp_off_mouthful_of_dayrange(InkTimeDayRange * dayrange_ptr, unsigned int biggest_width)
 {
@@ -330,7 +318,6 @@ ink_time_chomp_off_mouthful_of_dayrange(
   The pointer <buf> is returned.
 
  *---------------------------------------------------------------------------*/
-
 char *
 ink_time_dayrange_to_string(InkTimeDayRange * dayrange_ptr, char *buf, const size_t bufSize)
 {
@@ -372,7 +359,6 @@ static const char *_month_names[12] = {
   and year in GMT.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_current_mdy(int *m, int *dom, int *y)
 {
@@ -392,7 +378,6 @@ ink_time_current_mdy(int *m, int *dom, i
   and year.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_tm_to_mdy(struct tm *t, int *m, int *dom, int *y)
 {
@@ -410,7 +395,6 @@ ink_time_tm_to_mdy(struct tm *t, int *m,
   broken-down time in the structure pointed to by <t>.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_mdy_to_tm(int m, int dom, int y, struct tm *t)
 {
@@ -431,7 +415,6 @@ ink_time_mdy_to_tm(int m, int dom, int y
   The encoding is performed with respect to the base day.
 
  *---------------------------------------------------------------------------*/
-
 InkTimeDayID
 ink_time_mdy_to_dayid(int m, int dom, int y)
 {
@@ -456,7 +439,6 @@ ink_time_mdy_to_dayid(int m, int dom, in
   The encoding is performed with respect to the base day.
 
  *---------------------------------------------------------------------------*/
-
 InkTimeDayID
 ink_time_current_dayid()
 {
@@ -478,7 +460,6 @@ ink_time_current_dayid()
   month <m>, day of month <dom>, and year <y>.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_dayid_to_mdy(InkTimeDayID dayid, int *mp, int *dp, int *yp)
 {
@@ -498,7 +479,6 @@ ink_time_dayid_to_mdy(InkTimeDayID dayid
   Takes a date <m> <dom> <y>, and returns the number of days into year
<y>.
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_mdy_to_doy(int m, int dom, int y)
 {
@@ -518,7 +498,6 @@ ink_time_mdy_to_doy(int m, int dom, int 
   and determines the corresponding month, day of month, and day of week.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_doy_to_mdy(int doy, int year, int *mon, int *dom, int *dow)
 {
@@ -546,7 +525,6 @@ ink_time_doy_to_mdy(int doy, int year, i
   What day of the week does <month> <dom>, <year> fall on?
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_mdy_to_dow(int month, int dom, int year)
 {
@@ -567,7 +545,6 @@ ink_time_mdy_to_dow(int month, int dom, 
   This routine returns the number of days in a particular <month> and <year>.
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_days_in_month(int month, int year)
 {
@@ -583,7 +560,6 @@ ink_time_days_in_month(int month, int ye
   for leap years.
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_days_in_year(int year)
 {
@@ -598,7 +574,6 @@ ink_time_days_in_year(int year)
   What day is January 1 on in this year?
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_first_day_of_year(int year)
 {
@@ -624,7 +599,6 @@ ink_time_first_day_of_year(int year)
   string representing this day in the buffer pointed to by <buffer>.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_day_to_string(int day, char *buffer, const size_t bufferSize)
 {
@@ -640,7 +614,6 @@ ink_time_day_to_string(int day, char *bu
   string representing this day in the buffer pointed to by <buffer>.
 
  *---------------------------------------------------------------------------*/
-
 void
 ink_time_month_to_string(int month, char *buffer, const size_t bufferSize)
 {
@@ -656,7 +629,6 @@ ink_time_month_to_string(int month, char
   month number, else -1.
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_string_to_month(char *str)
 {
@@ -677,7 +649,6 @@ ink_time_string_to_month(char *str)
   Return 1 if <year> is a leap year, 0 if not, and -1 if negative leap year.
 
  *---------------------------------------------------------------------------*/
-
 int
 ink_time_leap_year_correction(int year)
 {
@@ -792,7 +763,7 @@ ink_gmtime_r(const ink_time_t * clock, s
 
   /* convert the days */
   d = yday - d;
-  if ((d<0) || (d> 366))
+  if (d> 366)
     return -1;
 
   size_t month = months[d];

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Tue Aug  3 23:21:28 2010
@@ -2360,7 +2360,7 @@ URLPartGet(INKMBuffer bufp, INKMLoc obj,
   return ((HdrHeapSDKHandle *) bufp)->make_sdk_string(str_ptr, str_len);
 }
 
-static const INKReturnCode
+static INKReturnCode
 URLPartSet(INKMBuffer bufp, INKMLoc obj, const char *value, int length, URLPartSetF url_f)
 {
 

Modified: trafficserver/traffic/trunk/proxy/InkAPITest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITest.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITest.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITest.cc Tue Aug  3 23:21:28 2010
@@ -25,7 +25,7 @@
 #include <sys/types.h>
 
 #include <errno.h>
-extern int errno;
+//extern int errno;
 
 #include <pthread.h>
 #include <unistd.h>
@@ -5863,7 +5863,7 @@ REGRESSION_TEST(SDK_API_INKMimeHdrParse)
             SDK_RPRINT(test, "INKMimeHdrFieldRemove", "TestCase1", TC_FAIL, "Field Not Removed");
           }
 
-          if ((test_passed_mime_hdr_field_remove = true)) {
+          if ((test_passed_mime_hdr_field_remove == true)) {
             if (INKMimeHdrFieldAppend(bufp2, mime_hdr_loc2, field_loc1) == INK_ERROR) {
               SDK_RPRINT(test, "INKMimeHdrFieldRemove", "TestCase1", TC_FAIL,
                          "Unable to readd the field to mime header. Probably destroyed");

Modified: trafficserver/traffic/trunk/proxy/Prefetch.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Prefetch.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Prefetch.cc (original)
+++ trafficserver/traffic/trunk/proxy/Prefetch.cc Tue Aug  3 23:21:28 2010
@@ -1846,12 +1846,8 @@ PrefetchConfiguration::readConfiguration
   TS_ReadConfigInteger(max_object_size, "proxy.config.prefetch.max_object_size");
 
   TS_ReadConfigInteger(max_recursion, "proxy.config.prefetch.max_recursion");
-  if (max_recursion < 0)
-    max_recursion = 0;
 
   TS_ReadConfigInteger(redirection, "proxy.config.prefetch.redirection");
-  if (redirection < 0)
-    redirection = 0;
 
   char *tstr = TS_ConfigReadString("proxy.config.prefetch.default_url_proto");
   if (config_read_proto(default_url_proto, tstr))

Modified: trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc Tue Aug  3 23:21:28 2010
@@ -1188,7 +1188,6 @@ HdrStrHeap::expand(char *ptr, int old_si
 
   ink_assert(ptr >= ((char *) this) + STR_HEAP_HDR_SIZE);
   ink_assert(ptr < ((char *) this) + m_heap_size);
-  ink_assert(expand_size >= 0);
 
   if (ptr + old_size == m_free_start && expand_size <= m_free_size) {
     m_free_start += expand_size;

Modified: trafficserver/traffic/trunk/proxy/http2/remap/UrlMapping.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/remap/UrlMapping.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/remap/UrlMapping.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/remap/UrlMapping.cc Tue Aug  3 23:21:28 2010
@@ -55,7 +55,7 @@ url_mapping::get_plugin(unsigned int ind
   Debug("url_rewrite", "get_plugin says we have %d plugins and asking for plugin %d", _plugin_count,
index);
   remap_plugin_info *plugin = NULL;
 
-  if (unlikely((index > _plugin_count) || index < 0)) {
+  if (unlikely(index > _plugin_count)) {
     return NULL;
   }
 

Modified: trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc Tue Aug  3 23:21:28 2010
@@ -79,6 +79,7 @@ MgmtDBM::mgmt_batch_open()
 
 #if defined(linux)
       union semun dummy_semun;
+      memset(&dummy_semun, 0, sizeof(dummy_semun));
       holding_pid = semctl(mgmt_sem_id, 0, GETPID, dummy_semun);
       current_val = semctl(mgmt_sem_id, 0, GETVAL, dummy_semun);
 #else

Modified: trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h Tue Aug  3 23:21:28 2010
@@ -222,6 +222,7 @@ public:
   {
     unlink(db_file);
     union semun semun_dummy;
+    memset(&semun_dummy, 0, sizeof(semun_dummy));
     if (initialized && semctl(mgmt_sem_id, 0, IPC_RMID, semun_dummy) < 0) {
       // INKqa02679 - do not call mgmt_fatal here since mgmt_fatal
       //   will end up calling this function and creating a loop

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc Tue Aug  3 23:21:28 2010
@@ -731,6 +731,7 @@ spawn_manager()
     err = semctl(err, 1, IPC_RMID);
 #else
     union semun dummy_semun;
+    memset(&dummy_semun, 0, sizeof(dummy_semun));
     err = semctl(err, 1, IPC_RMID, dummy_semun);
 #endif
     if (err < 0) {

Modified: trafficserver/traffic/trunk/proxy/mgmt2/tools/ShmemClean.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/tools/ShmemClean.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/tools/ShmemClean.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/tools/ShmemClean.cc Tue Aug  3 23:21:28 2010
@@ -40,6 +40,7 @@
 #include <sys/types.h>
 #include <sys/ipc.h>
 #include <sys/sem.h>
+#include <string.h>
 
 #if defined(linux)
 #include <sys/types.h>
@@ -82,6 +83,7 @@ main(int argc, char **argv)
     for (;;) {
 #if defined(linux)
       union semun semun_dummy;
+      memset(&semun_dummy, 0, sizeof(semun_dummy));
       if ((tmp = semget(start, 1, 0666)) < 0 || semctl(tmp, 1, IPC_RMID, semun_dummy)
< 0) {
 #else
       if ((tmp = semget(start, 1, 0666)) < 0 || semctl(tmp, 1, IPC_RMID) < 0) {
@@ -96,6 +98,7 @@ main(int argc, char **argv)
   for (int i = start; i < end; i++) {
 #if defined(linux)
     union semun semun_dummy;
+    memset(&semun_dummy, 0, sizeof(semun_dummy));
     if ((tmp = semget(i, 1, 0666)) < 0 || semctl(tmp, 1, IPC_RMID, semun_dummy) < 0)
{
 #else
     if ((tmp = semget(i, 1, 0666)) < 0 || semctl(tmp, 1, IPC_RMID) < 0) {

Modified: trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc Tue Aug  3 23:21:28 2010
@@ -1536,7 +1536,7 @@ setSNMP(char *sys_location, char *sys_co
       chmod(snmp_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
       // cast type in order to get rid of compiling error. disable coverity check here
       // coverity[cast_to_qualified_type]
-      if (chown(snmp_path, (const int) -1, wheel_gid) == -1) {
+      if (chown(snmp_path, (uid_t) -1, wheel_gid) == -1) {
         DPRINTF(("[SysAPI] can not chown new ts_snmp cfg file\n"));
       }
     }

Modified: trafficserver/traffic/trunk/proxy/signals.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/signals.cc?rev=982066&r1=982065&r2=982066&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/signals.cc (original)
+++ trafficserver/traffic/trunk/proxy/signals.cc Tue Aug  3 23:21:28 2010
@@ -552,6 +552,7 @@ init_signals2()
   eventProcessor.schedule_every(new SignalContinuation, HRTIME_MSECOND * 500, ET_CALL);
   REC_RegisterConfigUpdateFunc("proxy.config.dump_mem_info_frequency", init_tracker, NULL);
   RecData data;
+  data.rec_int = 0; // Shouldn't be used now anyways
   init_tracker(NULL, RECD_INT, data, NULL);
 }
 



Mime
View raw message