[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/indexlib
From:       Luís Pedro Coelho <luis () luispedro ! org>
Date:       2005-07-15 21:49:38
Message-ID: 1121464178.107276.23371.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 434971 by luis_pedro:

Shut up warning.
And if we ever add another element to the enum, then the warning will resurface to show a bug


 M  +4 -0      create.cpp  


--- trunk/kdesupport/indexlib/create.cpp #434970:434971
@@ -32,6 +32,7 @@
 #include "quotes.h"
 #include "path.h"
 #include "version.h"
+#include "version.h"
 #include <fstream>
 #include <unistd.h>
 
@@ -79,6 +80,8 @@
 		if ( flags == open_flags::fail_if_nonexistant ) return std::auto_ptr<indexlib::index>();
 		return create( basename, index_type::type( flags ) );
 	}
+	logfile() << format( "%s:%s: Unexpected code reached!\n" ) % __FILE__ % __LINE__;
+	return std::auto_ptr<indexlib::index>( 0 );
 }
 
 bool indexlib::exists( const char* basename ) {
@@ -95,6 +98,7 @@
 					break;
 		case index_type::quotes: quotes::remove( basename );
 					 break;
+		case index_type::none: /* do nothing */;
 	}
 	::unlink( path_concat( basename, "info" ).c_str() );
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic