Package: catch
Version: 1.0+m10git1e2f1d16-1
Severity: normal
Tags: patch

Dear Maintainer,

With -Wconversion and -Wshadow turned out, catch.hpp causes
g++ to emit some warnings.

The patch below fixes the issues:

--- /usr/include/catch.hpp      2013-09-15 08:40:13.000000000 -0600
+++ catch.hpp   2013-11-18 11:16:56.233905057 -0700
@@ -1707,9 +1707,9 @@
         :   m_isNegated( false )
         {}
 
-        Tag( std::string const& name, bool isNegated )
+        Tag( std::string const& name, bool isNeg )
         :   m_name( name ),
-            m_isNegated( isNegated )
+            m_isNegated( isNeg )
         {}
 
         std::string getName() const {
@@ -2163,15 +2163,15 @@
                         groupName += " ";
                     groupName += data.testsOrTags[i];
                 }
-                TestCaseFilters filters( groupName );
+                TestCaseFilters filts( groupName );
                 for( std::size_t i = 0; i < data.testsOrTags.size(); ++i ) {
                     std::string filter = data.testsOrTags[i];
                     if( startsWith( filter, "[" ) || startsWith( filter, "~[" 
) )
-                        filters.addTags( filter );
+                        filts.addTags( filter );
                     else
-                        filters.addFilter( TestCaseFilter( filter ) );
+                        filts.addFilter( TestCaseFilter( filter ) );
                 }
-                m_filterSets.push_back( filters );
+                m_filterSets.push_back( filts );
             }
         }
 
@@ -2205,18 +2205,18 @@
         }
 
         void useStream( std::string const& streamName ) {
-            Stream stream = createStream( streamName );
-            setStreamBuf( stream.streamBuf );
+            Stream strm = createStream( streamName );
+            setStreamBuf( strm.streamBuf );
             m_stream.release();
-            m_stream = stream;
+            m_stream = strm;
         }
 
         std::string getReporterName() const { return m_data.reporterName; }
 
         void addTestSpec( std::string const& testSpec ) {
-            TestCaseFilters filters( testSpec );
-            filters.addFilter( TestCaseFilter( testSpec ) );
-            m_filterSets.push_back( filters );
+            TestCaseFilters filts( testSpec );
+            filts.addFilter( TestCaseFilter( testSpec ) );
+            m_filterSets.push_back( filts );
         }
 
         int abortAfter() const {
@@ -4153,12 +4153,12 @@
                 m_arg.description = description;
                 return *this;
             }
-            ArgBinder& hint( std::string const& hint ) {
-                m_arg.hint = hint;
+            ArgBinder& hint( std::string const& hnt ) {
+                m_arg.hint = hnt;
                 return *this;
             }
-            ArgBinder& position( int position ) {
-                m_arg.position = position;
+            ArgBinder& position( int pos ) {
+                m_arg.position = pos;
                 return *this;
             }
         private:
@@ -4199,15 +4199,15 @@
                 maxWidth = (std::max)( maxWidth, it->commands().size() );
 
             for( it = itBegin; it != itEnd; ++it ) {
-                Catch::Text usage( it->commands(), Catch::TextAttributes()
+                Catch::Text usg( it->commands(), Catch::TextAttributes()
                                                         .setWidth( 
maxWidth+indent )
                                                         .setIndent( indent ) );
                 // !TBD handle longer usage strings
                 Catch::Text desc( it->description, Catch::TextAttributes()
                                                         .setWidth( width - 
maxWidth -3 ) );
 
-                for( std::size_t i = 0; i < (std::max)( usage.size(), 
desc.size() ); ++i ) {
-                    std::string usageCol = i < usage.size() ? usage[i] : "";
+                for( std::size_t i = 0; i < (std::max)( usg.size(), 
desc.size() ); ++i ) {
+                    std::string usageCol = i < usg.size() ? usg[i] : "";
                     os << usageCol;
 
                     if( i < desc.size() && !desc[i].empty() )
@@ -4902,11 +4902,11 @@
 
     public:
 
-        explicit RunContext( Ptr<IConfig const> const& config, 
Ptr<IStreamingReporter> const& reporter )
-        :   m_runInfo( config->name() ),
+        explicit RunContext( Ptr<IConfig const> const& cfg, 
Ptr<IStreamingReporter> const& reporter )
+        :   m_runInfo( cfg->name() ),
             m_context( getCurrentMutableContext() ),
             m_activeTestCase( NULL ),
-            m_config( config ),
+            m_config( cfg ),
             m_reporter( reporter ),
             m_prevRunner( &m_context.getRunner() ),
             m_prevResultCapture( &m_context.getResultCapture() ),
@@ -6620,7 +6620,7 @@
         return (unsigned int)((getCurrentTicks() - m_ticks)/1000);
     }
     double Timer::getElapsedSeconds() const {
-        return (getCurrentTicks() - m_ticks)/1000000.0;
+        return double(getCurrentTicks() - m_ticks)/1000000.0;
     }
 
 } // namespace Catch

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information



This message and any enclosures are intended only for the addressee.  Please 
notify the sender by email if you are not the intended recipient.  If you are 
not the intended recipient, you may not use, copy, disclose, or distribute this 
message or its contents or enclosures to any other person and any such actions 
may be unlawful.  Ball reserves the right to monitor and review all messages 
and enclosures sent to or from this email address.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to