[Freeswitch-svn] [commit] r11527 - freeswitch/trunk/libs/sqlite/src

FreeSWITCH SVN mikej at freeswitch.org
Tue Jan 27 16:39:04 PST 2009


Author: mikej
Date: Tue Jan 27 18:39:04 2009
New Revision: 11527

Log:
sqlite: fix build with -Werror

Modified:
   freeswitch/trunk/libs/sqlite/src/os.h
   freeswitch/trunk/libs/sqlite/src/vdbemem.c
   freeswitch/trunk/libs/sqlite/src/vtab.c

Modified: freeswitch/trunk/libs/sqlite/src/os.h
==============================================================================
--- freeswitch/trunk/libs/sqlite/src/os.h	(original)
+++ freeswitch/trunk/libs/sqlite/src/os.h	Tue Jan 27 18:39:04 2009
@@ -64,6 +64,7 @@
 # define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP)
 #else
 # define SQLITE_TEMPNAME_SIZE 200
+# include <unistd.h>
 #endif
 
 /* If the SET_FULLSYNC macro is not defined above, then make it

Modified: freeswitch/trunk/libs/sqlite/src/vdbemem.c
==============================================================================
--- freeswitch/trunk/libs/sqlite/src/vdbemem.c	(original)
+++ freeswitch/trunk/libs/sqlite/src/vdbemem.c	Tue Jan 27 18:39:04 2009
@@ -760,7 +760,7 @@
   pVal->flags |= (pVal->flags & MEM_Blob)>>3;
   if( pVal->flags&MEM_Str ){
     sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
-    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(int)pVal->z) ){
+    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(int)(intptr_t)pVal->z) ){
       assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
       if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
         return 0;
@@ -770,7 +770,7 @@
   }else{
     assert( (pVal->flags&MEM_Blob)==0 );
     sqlite3VdbeMemStringify(pVal, enc);
-    assert( 0==(1&(int)pVal->z) );
+    assert( 0==(1&(int)(intptr_t)pVal->z) );
   }
   assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || sqlite3MallocFailed() );
   if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){

Modified: freeswitch/trunk/libs/sqlite/src/vtab.c
==============================================================================
--- freeswitch/trunk/libs/sqlite/src/vtab.c	(original)
+++ freeswitch/trunk/libs/sqlite/src/vtab.c	Tue Jan 27 18:39:04 2009
@@ -15,6 +15,7 @@
 */
 #ifndef SQLITE_OMIT_VIRTUALTABLE
 #include "sqliteInt.h"
+#include "os.h"
 
 /*
 ** External API function used to create a new virtual-table module.
@@ -562,7 +563,7 @@
 ** sqlite3.aVTrans array. Then clear the array itself.
 */
 int sqlite3VtabRollback(sqlite3 *db){
-  callFinaliser(db, (int)(&((sqlite3_module *)0)->xRollback));
+  callFinaliser(db, (int)(intptr_t)(&((sqlite3_module *)0)->xRollback));
   return SQLITE_OK;
 }
 
@@ -571,7 +572,7 @@
 ** sqlite3.aVTrans array. Then clear the array itself.
 */
 int sqlite3VtabCommit(sqlite3 *db){
-  callFinaliser(db, (int)(&((sqlite3_module *)0)->xCommit));
+  callFinaliser(db, (int)(intptr_t)(&((sqlite3_module *)0)->xCommit));
   return SQLITE_OK;
 }
 



More information about the Freeswitch-svn mailing list