]> granicus.if.org Git - php/commitdiff
The integer timeout is cast to a void *, passed to this function, and
authorSascha Schumann <sas@php.net>
Sun, 17 Aug 2003 13:57:53 +0000 (13:57 +0000)
committerSascha Schumann <sas@php.net>
Sun, 17 Aug 2003 13:57:53 +0000 (13:57 +0000)
cast back.

Add a cast to (long) to quiet the compiler

ext/sqlite/libsqlite/src/main.c

index e2d51d87df21d493ff7254c2db91b1226b07003c..648a9ea4261f2a0495cca9f2af1f5dcc587ab77a 100644 (file)
@@ -764,7 +764,8 @@ static int sqliteDefaultBusyCallback(
 #if SQLITE_MIN_SLEEP_MS==1
   int delay = 10;
   int prior_delay = 0;
-  int timeout = (int)Timeout;
+  /* We seem to be called by a generic cb mechanism which passes void ptrs */
+  int timeout = (int)(long)Timeout;
   int i;
 
   for(i=1; i<count; i++){ 
@@ -783,7 +784,7 @@ static int sqliteDefaultBusyCallback(
   sqliteOsSleep(delay);
   return 1;
 #else
-  int timeout = (int)Timeout;
+  int timeout = (int)(long)Timeout;
   if( (count+1)*1000 > timeout ){
     return 0;
   }