]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
sqlite: fix build with -Werror
authorMichael Jerris <mike@jerris.com>
Wed, 28 Jan 2009 00:39:04 +0000 (00:39 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 28 Jan 2009 00:39:04 +0000 (00:39 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11527 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sqlite/src/os.h
libs/sqlite/src/vdbemem.c
libs/sqlite/src/vtab.c

index 0fe7b156ee917c7319efcf7ad83d11d56703b64f..4101fdf9596e4e31e9ef9b63874ac6c22a01cae0 100644 (file)
@@ -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
index 87059c8a8d6b5bbfe0e4c9a5516426a193d7ee9d..302fd89d082ba954066d8e87522dc6eedac561ad 100644 (file)
@@ -760,7 +760,7 @@ const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
   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 @@ const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
   }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) ){
index c08752aeb5599e91ead861912134353507fc300a..9661941f5ed746f87f88640977579677bbfe2718 100644 (file)
@@ -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 @@ int sqlite3VtabSync(sqlite3 *db, int rc2){
 ** 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 @@ int sqlite3VtabRollback(sqlite3 *db){
 ** 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;
 }