Browse Source

Fixed some compiler warnings.

August Mueller 15 years ago
parent
commit
c23c216883
4 changed files with 14 additions and 2 deletions
  1. 3 0
      CHANGES_AND_TODO_LIST.txt
  2. 1 0
      CONTRIBUTORS.txt
  3. 8 0
      fmdb.xcodeproj/project.pbxproj
  4. 2 2
      src/FMResultSet.m

+ 3 - 0
CHANGES_AND_TODO_LIST.txt

@@ -3,6 +3,9 @@ Zip, nada, zilch.  Got any ideas?
 
 If you would like to contribute some code- awesome!  I just ask that you make it conform to the coding conventions already set in here, and to add a couple of tests for your new code to fmdb.m.  And of course, the code should be of general use to more than just a couple of folks.  Send your patches to gus@flyingmeat.com.
 
+2010.12.28
+    Fixed some compiler warnings (thanks to Casey Fleser!)
+
 2010.11.30
     Added and updated some new methods to take NSError** params.
     Only execute the assertion macros if NS_BLOCK_ASSERTIONS is not set.  Patch from David E. Wheeler!

+ 1 - 0
CONTRIBUTORS.txt

@@ -24,5 +24,6 @@ Jens Alfke
 Pascal Pfiffner
 Augie Fackler
 David E. Wheeler
+Casey Fleser
 
 Aaaaannnd, Gus Mueller (that's me!)

+ 8 - 0
fmdb.xcodeproj/project.pbxproj

@@ -213,8 +213,16 @@
 		1DEB927908733DD40010E9CD /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = (
+					x86_64,
+					i386,
+				);
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_MISSING_PARENTHESES = YES;
+				GCC_WARN_PEDANTIC = YES;
+				GCC_WARN_SIGN_COMPARE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				PREBINDING = NO;
 			};

+ 2 - 2
src/FMResultSet.m

@@ -78,12 +78,12 @@ - (void)kvcMagic:(id)object {
 
 - (NSDictionary *)resultDict {
     
-    NSInteger num_cols = sqlite3_data_count(statement.statement);
+    int num_cols = sqlite3_data_count(statement.statement);
     
     if (num_cols > 0) {
         NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:num_cols];
         
-        NSUInteger i;
+        int i;
         for (i = 0; i < num_cols; i++) {
             
             const char *col_name = sqlite3_column_name(statement.statement, i);