Author: afester
Date: Mon Jul 17 11:43:26 2006
New Revision: 422791

URL: http://svn.apache.org/viewvc?rev=422791&view=rev
Log:
LOGCXX-14: Some additional overlooked fixes of "declaration of ‘local’ shadows 
a member of 'this'" when compiling with g++ -Wshadow

Modified:
    logging/log4cxx/trunk/src/asyncappender.cpp
    logging/log4cxx/trunk/src/exception.cpp
    logging/log4cxx/trunk/src/hierarchy.cpp
    logging/log4cxx/trunk/src/rollingpolicybase.cpp
    logging/log4cxx/trunk/src/simpledateformat.cpp
    logging/log4cxx/trunk/src/socketappender.cpp
    logging/log4cxx/trunk/src/xmlsocketappender.cpp

Modified: logging/log4cxx/trunk/src/asyncappender.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/asyncappender.cpp?rev=422791&r1=422790&r2=422791&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/asyncappender.cpp (original)
+++ logging/log4cxx/trunk/src/asyncappender.cpp Mon Jul 17 11:43:26 2006
@@ -162,10 +162,10 @@
         aai->removeAppender(appender);
 }
 
-void AsyncAppender::removeAppender(const LogString& name)
+void AsyncAppender::removeAppender(const LogString& name1)
 {
     synchronized sync(aai->getMutex());
-        aai->removeAppender(name);
+        aai->removeAppender(name1);
 }
 
 void* LOG4CXX_THREAD_FUNC AsyncAppender::dispatch(log4cxx_thread_t* thread, 
void* data) {

Modified: logging/log4cxx/trunk/src/exception.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/exception.cpp?rev=422791&r1=422790&r2=422791&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/exception.cpp (original)
+++ logging/log4cxx/trunk/src/exception.cpp Mon Jul 17 11:43:26 2006
@@ -25,10 +25,10 @@
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 
-Exception::Exception(const std::string& msg) {
-  size_t msgLen = msg.length();
+Exception::Exception(const std::string& msg1) {
+  size_t msgLen = msg1.length();
   if (msgLen > MSG_SIZE) msgLen = MSG_SIZE;
-  memcpy(this->msg, (char*) msg.data(), msgLen);
+  memcpy(this->msg, (char*) msg1.data(), msgLen);
   this->msg[msgLen] = 0;
 }
 

Modified: logging/log4cxx/trunk/src/hierarchy.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/hierarchy.cpp?rev=422791&r1=422790&r2=422791&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/hierarchy.cpp (original)
+++ logging/log4cxx/trunk/src/hierarchy.cpp Mon Jul 17 11:43:26 2006
@@ -39,7 +39,7 @@
 
 IMPLEMENT_LOG4CXX_OBJECT(Hierarchy)
 
-Hierarchy::Hierarchy(const LoggerPtr& root) : root(root),
+Hierarchy::Hierarchy(const LoggerPtr& root1) : root(root1),
 emittedNoAppenderWarning(false), emittedNoResourceBundleWarning(false),
 mutex(), configured(false), thresholdInt(Level::ALL_INT), 
threshold(Level::getAll())
 {
@@ -235,10 +235,10 @@
 
         shutdown(); // nested locks are OK
 
-        LoggerList loggers = getCurrentLoggers();
-        LoggerList::iterator it, itEnd = loggers.end();
+        LoggerList loggers1 = getCurrentLoggers();
+        LoggerList::iterator it, itEnd = loggers1.end();
 
-        for (it = loggers.begin(); it != itEnd; it++)
+        for (it = loggers1.begin(); it != itEnd; it++)
         {
                 LoggerPtr& logger = *it;
                 logger->setLevel(0);
@@ -255,23 +255,23 @@
 
       setConfigured(false);
 
-        LoggerPtr root = getRootLogger();
+        LoggerPtr root1 = getRootLogger();
 
         // begin by closing nested appenders
-        root->closeNestedAppenders();
+        root1->closeNestedAppenders();
 
-        LoggerList loggers = getCurrentLoggers();
-        LoggerList::iterator it, itEnd = loggers.end();
+        LoggerList loggers1 = getCurrentLoggers();
+        LoggerList::iterator it, itEnd = loggers1.end();
 
-        for (it = loggers.begin(); it != itEnd; it++)
+        for (it = loggers1.begin(); it != itEnd; it++)
         {
                 LoggerPtr& logger = *it;
                 logger->closeNestedAppenders();
         }
 
         // then, remove all appenders
-        root->removeAllAppenders();
-        for (it = loggers.begin(); it != itEnd; it++)
+        root1->removeAllAppenders();
+        for (it = loggers1.begin(); it != itEnd; it++)
         {
                 LoggerPtr& logger = *it;
                 logger->removeAllAppenders();

Modified: logging/log4cxx/trunk/src/rollingpolicybase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/rollingpolicybase.cpp?rev=422791&r1=422790&r2=422791&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/rollingpolicybase.cpp (original)
+++ logging/log4cxx/trunk/src/rollingpolicybase.cpp Mon Jul 17 11:43:26 2006
@@ -39,9 +39,9 @@
     parseFileNamePattern();
   } else {
     LogString msg(LOG4CXX_STR("The FileNamePattern option must be set before 
using FixedWindowRollingPolicy."));
-    LogString ref(LOG4CXX_STR("See also 
http://logging.apache.org/log4j/codes.html#tbr_fnp_not_set";));
+    LogString ref1(LOG4CXX_STR("See also 
http://logging.apache.org/log4j/codes.html#tbr_fnp_not_set";));
     LogLog::warn(msg);
-    LogLog::warn(ref);
+    LogLog::warn(ref1);
     throw IllegalStateException();
   }
 }

Modified: logging/log4cxx/trunk/src/simpledateformat.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/simpledateformat.cpp?rev=422791&r1=422790&r2=422791&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/simpledateformat.cpp (original)
+++ logging/log4cxx/trunk/src/simpledateformat.cpp Mon Jul 17 11:43:26 2006
@@ -56,7 +56,7 @@
       * @param time The time structure to render.
       * @param spec The format for rendering the structure.
       */
-     void renderFacet( const std::locale & locale, std::basic_ostream < 
localechar > & buffer, 
+     void renderFacet( const std::locale & locale, std::basic_ostream < 
localechar > & buffer,
                        const tm * time, const localechar spec )
            {
        #if defined(_USEFAC)
@@ -156,7 +156,7 @@
 class LiteralToken : public PatternToken
 {
 public:
-  LiteralToken( localechar ch, int count ) : ch( ch ), count( count )
+  LiteralToken( localechar ch1, int count1 ) : ch( ch1 ), count( count1 )
   {
   }
 
@@ -190,7 +190,7 @@
 class NumericToken : public PatternToken
 {
 public:
-  NumericToken( size_t width ) : width( width )
+  NumericToken( size_t width1 ) : width( width1 )
   {
   }
 
@@ -217,7 +217,7 @@
 class YearToken : public NumericToken
 {
 public:
-  YearToken( int width ) : NumericToken( width )
+  YearToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -232,7 +232,7 @@
 class MonthToken : public NumericToken
 {
 public:
-  MonthToken( int width ) : NumericToken( width )
+  MonthToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -334,7 +334,7 @@
 class WeekInYearToken : public NumericToken
 {
 public:
-  WeekInYearToken( int width ) : NumericToken( width )
+  WeekInYearToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -349,7 +349,7 @@
 class WeekInMonthToken : public NumericToken
 {
 public:
-  WeekInMonthToken( int width ) : NumericToken( width )
+  WeekInMonthToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -364,7 +364,7 @@
 class DayInMonthToken : public NumericToken
 {
 public:
-  DayInMonthToken( int width ) : NumericToken( width )
+  DayInMonthToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -379,7 +379,7 @@
 class DayInYearToken : public NumericToken
 {
 public:
-  DayInYearToken( int width ) : NumericToken( width )
+  DayInYearToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -394,7 +394,7 @@
 class DayOfWeekInMonthToken : public NumericToken
 {
 public:
-  DayOfWeekInMonthToken( int width ) : NumericToken( width )
+  DayOfWeekInMonthToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -497,7 +497,7 @@
 class MilitaryHourToken : public NumericToken
 {
 public:
-  MilitaryHourToken( int width, int offset ) : NumericToken( width ), offset( 
offset )
+  MilitaryHourToken( int width1, int offset1 ) : NumericToken( width1 ), 
offset( offset1 )
   {
   }
 
@@ -515,7 +515,7 @@
 class HourToken : public NumericToken
 {
 public:
-  HourToken( int width, int offset ) : NumericToken( width )
+  HourToken( int width1, int offset1 ) : NumericToken( width1 )
   {
   }
 
@@ -533,7 +533,7 @@
 class MinuteToken : public NumericToken
 {
 public:
-  MinuteToken( int width ) : NumericToken( width )
+  MinuteToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -548,7 +548,7 @@
 class SecondToken : public NumericToken
 {
 public:
-  SecondToken( int width ) : NumericToken( width )
+  SecondToken( int width1 ) : NumericToken( width1 )
   {
   }
 
@@ -563,7 +563,7 @@
 class MillisecondToken : public NumericToken
 {
 public:
-  MillisecondToken( int width ) : NumericToken( width )
+  MillisecondToken( int width1 ) : NumericToken( width1 )
   {
   }
 

Modified: logging/log4cxx/trunk/src/socketappender.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/socketappender.cpp?rev=422791&r1=422790&r2=422791&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/socketappender.cpp (original)
+++ logging/log4cxx/trunk/src/socketappender.cpp Mon Jul 17 11:43:26 2006
@@ -61,10 +61,10 @@
 }
 
 void SocketAppender::renderEvent(const spi::LoggingEventPtr& event,
-     helpers::SocketOutputStreamPtr& os,
+     helpers::SocketOutputStreamPtr& os1,
      Pool& p)
 {
-        event->write(os);
+        event->write(os1);
 }
 
 #endif

Modified: logging/log4cxx/trunk/src/xmlsocketappender.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/xmlsocketappender.cpp?rev=422791&r1=422790&r2=422791&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/xmlsocketappender.cpp (original)
+++ logging/log4cxx/trunk/src/xmlsocketappender.cpp Mon Jul 17 11:43:26 2006
@@ -70,15 +70,15 @@
 }
 
 
-void XMLSocketAppender::setLocationInfo(bool locationInfo) {
-        this->locationInfo = locationInfo;
+void XMLSocketAppender::setLocationInfo(bool locationInfo1) {
+        this->locationInfo = locationInfo1;
         XMLLayoutPtr xmlLayout = layout;
-        xmlLayout->setLocationInfo(locationInfo);
+        xmlLayout->setLocationInfo(locationInfo1);
 }
 
 
 void XMLSocketAppender::renderEvent(const spi::LoggingEventPtr& event,
-    helpers::SocketOutputStreamPtr& os, Pool& p)
+    helpers::SocketOutputStreamPtr& os1, Pool& p)
 {
         LogString output;
 


Reply via email to