/ Check-in [8b5f617c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix several compiler warnings seen with MSVC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | msvcWarnings
Files: files | file ages | folders
SHA1: 8b5f617c2a5f0bf7bdbd9144aee58d69564db1e2
User & Date: mistachkin 2012-10-01 20:12:30
Context
2012-10-01
20:32
Fix harmless compiler warnings. check-in: 59c2be75 user: drh tags: trunk
20:12
Fix several compiler warnings seen with MSVC. Closed-Leaf check-in: 8b5f617c user: mistachkin tags: msvcWarnings
18:44
Add SQLITE_FCNTL_BUSYHANDLER. Invoked to provide access to the busy-handler callback to custom VFS implementations. check-in: 1262d2f4 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/rtree/rtree.c.

  2656   2656   }
  2657   2657   
  2658   2658   /*
  2659   2659   ** Remove the entry with rowid=iDelete from the r-tree structure.
  2660   2660   */
  2661   2661   static int rtreeDeleteRowid(Rtree *pRtree, sqlite3_int64 iDelete){
  2662   2662     int rc;                         /* Return code */
  2663         -  RtreeNode *pLeaf;               /* Leaf node containing record iDelete */
         2663  +  RtreeNode *pLeaf = 0;           /* Leaf node containing record iDelete */
  2664   2664     int iCell;                      /* Index of iDelete cell in pLeaf */
  2665   2665     RtreeNode *pRoot;               /* Root node of rtree structure */
  2666   2666   
  2667   2667   
  2668   2668     /* Obtain a reference to the root node to initialise Rtree.iDepth */
  2669   2669     rc = nodeAcquire(pRtree, 1, 0, &pRoot);
  2670   2670   
................................................................................
  2859   2859   
  2860   2860     /* If the azData[] array contains more than one element, elements
  2861   2861     ** (azData[2]..azData[argc-1]) contain a new record to insert into
  2862   2862     ** the r-tree structure.
  2863   2863     */
  2864   2864     if( rc==SQLITE_OK && nData>1 ){
  2865   2865       /* Insert the new record into the r-tree */
  2866         -    RtreeNode *pLeaf;
         2866  +    RtreeNode *pLeaf = 0;
  2867   2867   
  2868   2868       /* Figure out the rowid of the new row. */
  2869   2869       if( bHaveRowid==0 ){
  2870   2870         rc = newRowid(pRtree, &cell.iRowid);
  2871   2871       }
  2872   2872       *pRowid = cell.iRowid;
  2873   2873   

Changes to src/main.c.

  3015   3015       ** operation N should be 0.  The idea is that a test program (like the
  3016   3016       ** SQL Logic Test or SLT test module) can run the same SQL multiple times
  3017   3017       ** with various optimizations disabled to verify that the same answer
  3018   3018       ** is obtained in every case.
  3019   3019       */
  3020   3020       case SQLITE_TESTCTRL_OPTIMIZATIONS: {
  3021   3021         sqlite3 *db = va_arg(ap, sqlite3*);
  3022         -      db->dbOptFlags = (u16)(va_arg(ap, int) & 0xffff);
         3022  +      db->dbOptFlags = (u8)(va_arg(ap, int) & 0xff);
  3023   3023         break;
  3024   3024       }
  3025   3025   
  3026   3026   #ifdef SQLITE_N_KEYWORD
  3027   3027       /* sqlite3_test_control(SQLITE_TESTCTRL_ISKEYWORD, const char *zWord)
  3028   3028       **
  3029   3029       ** If zWord is a keyword recognized by the parser, then return the

Changes to src/pager.c.

  3477   3477     int (*xBusyHandler)(void *),         /* Pointer to busy-handler function */
  3478   3478     void *pBusyHandlerArg                /* Argument to pass to xBusyHandler */
  3479   3479   ){
  3480   3480     pPager->xBusyHandler = xBusyHandler;
  3481   3481     pPager->pBusyHandlerArg = pBusyHandlerArg;
  3482   3482   
  3483   3483     if( isOpen(pPager->fd) ){
  3484         -    void **ap = &pPager->xBusyHandler;
         3484  +    void **ap = (void **)&pPager->xBusyHandler;
  3485   3485       assert( ((int(*)(void *))(ap[0]))==xBusyHandler );
  3486   3486       assert( ap[1]==pBusyHandlerArg );
  3487   3487       sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_BUSYHANDLER, (void *)ap);
  3488   3488     }
  3489   3489   }
  3490   3490   
  3491   3491   /*