/ Check-in [68f15442]
Login

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

Overview
Comment:Changes to remove some compiler warnings from MSVC. (CVS 6294)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 68f15442e8db364952d30daf4ce60c6b938f5906
User & Date: shane 2009-02-16 17:55:47
Context
2009-02-17
16:17
Make sure result variables are initialized or unused following a failure of the xFullPathname VFS interface. Problem detected by valgrind. (CVS 6295) check-in: 59a47551 user: drh tags: trunk
2009-02-16
17:55
Changes to remove some compiler warnings from MSVC. (CVS 6294) check-in: 68f15442 user: shane tags: trunk
16:23
Fix a compiler warning in backup.c. (CVS 6293) check-in: 82222fbf user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/backup.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains the implementation of the sqlite3_backup_XXX() 
    13     13   ** API functions and the related features.
    14     14   **
    15         -** $Id: backup.c,v 1.11 2009/02/16 16:23:09 drh Exp $
           15  +** $Id: backup.c,v 1.12 2009/02/16 17:55:47 shane Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   #include "btreeInt.h"
    19     19   
    20     20   /* Macro to find the minimum of two numeric values.
    21     21   */
    22     22   #ifndef MIN
................................................................................
   392    392           **     copied into the destination database.
   393    393           */
   394    394           const i64 iSize = (i64)nSrcPagesize * (i64)nSrcPage;
   395    395           sqlite3_file * const pFile = sqlite3PagerFile(pDestPager);
   396    396   
   397    397           assert( pFile );
   398    398           assert( (i64)nDestTruncate*(i64)nDestPagesize >= iSize || (
   399         -              nDestTruncate==(PENDING_BYTE_PAGE(p->pDest->pBt)-1)
          399  +              nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1)
   400    400              && iSize>=PENDING_BYTE && iSize<=PENDING_BYTE+nDestPagesize
   401    401           ));
   402    402           if( SQLITE_OK==(rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 1))
   403    403            && SQLITE_OK==(rc = backupTruncateFile(pFile, iSize))
   404    404            && SQLITE_OK==(rc = sqlite3PagerSync(pDestPager))
   405    405           ){
   406    406             i64 iOff;

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.816 2009/02/10 11:17:43 danielk1977 Exp $
           46  +** $Id: vdbe.c,v 1.817 2009/02/16 17:55:47 shane Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include "vdbeInt.h"
    50     50   
    51     51   /*
    52     52   ** The following global variable is incremented every time a cursor
    53     53   ** moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes.  The test
................................................................................
  3486   3486       ** random number generator based on the RC4 algorithm.
  3487   3487       **
  3488   3488       ** To promote locality of reference for repetitive inserts, the
  3489   3489       ** first few attempts at choosing a random rowid pick values just a little
  3490   3490       ** larger than the previous rowid.  This has been shown experimentally
  3491   3491       ** to double the speed of the COPY operation.
  3492   3492       */
  3493         -    int res, rx=SQLITE_OK, cnt;
         3493  +    int res=0, rx=SQLITE_OK, cnt;
  3494   3494       i64 x;
  3495   3495       cnt = 0;
  3496   3496       if( (sqlite3BtreeFlags(pC->pCursor)&(BTREE_INTKEY|BTREE_ZERODATA)) !=
  3497   3497             BTREE_INTKEY ){
  3498   3498         rc = SQLITE_CORRUPT_BKPT;
  3499   3499         goto abort_due_to_error;
  3500   3500       }
................................................................................
  3710   3710   ** If P4 is not NULL, then it is the name of the table that P1 is
  3711   3711   ** pointing to.  The update hook will be invoked, if it exists.
  3712   3712   ** If P4 is not NULL then the P1 cursor must have been positioned
  3713   3713   ** using OP_NotFound prior to invoking this opcode.
  3714   3714   */
  3715   3715   case OP_Delete: {
  3716   3716     int i = pOp->p1;
  3717         -  i64 iKey;
         3717  +  i64 iKey = 0;
  3718   3718     VdbeCursor *pC;
  3719   3719   
  3720   3720     assert( i>=0 && i<p->nCursor );
  3721   3721     pC = p->apCsr[i];
  3722   3722     assert( pC!=0 );
  3723   3723     assert( pC->pCursor!=0 );  /* Only valid for real tables, no pseudotables */
  3724   3724