/ Check-in [7b76be41]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix harmless compiler warnings in test code for MSVC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7b76be4117f4e57091b03fafcf42d17bce81160d
User & Date: drh 2016-11-11 20:37:27
Context
2016-11-14
08:19
Fix an fts5 problem causing a crash in phrase queries where the first token of the phrase matches one or more rows but some other token within the phrase matches zero. check-in: e78f6f3b user: dan tags: trunk
2016-11-11
20:37
Fix harmless compiler warnings in test code for MSVC. check-in: 7b76be41 user: drh tags: trunk
19:08
Avoid storing redundant fields in sorter records when the sort-key and data have fields in common. check-in: b835cf3e user: drh tags: trunk
18:19
Remove obselete and unused logic in the update code generator. Fix the sqlite3BtreeMovetoUnpacked() routine so that it remembers the rowid of the row that it landed on. Closed-Leaf check-in: 1a587d72 user: drh tags: unpacked-IdxInsert
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_blob.c.

   110    110     const char *zTable;
   111    111     const char *zColumn;
   112    112     Tcl_WideInt iRowid;
   113    113     int flags;
   114    114     const char *zVarname;
   115    115     int nVarname;
   116    116   
   117         -  sqlite3_blob *pBlob = (sqlite3_blob*)0xFFFFFFFF;
          117  +  sqlite3_blob *pBlob = (sqlite3_blob*)&flags;   /* Non-zero initialization */
   118    118     int rc;
   119    119   
   120    120     if( objc!=8 ){
   121    121       const char *zUsage = "DB DATABASE TABLE COLUMN ROWID FLAGS VARNAME";
   122    122       Tcl_WrongNumArgs(interp, 1, objv, zUsage);
   123    123       return TCL_ERROR;
   124    124     }

Changes to src/test_delete.c.

    43     43   /*
    44     44   ** This routine is a copy of (most of) the code from SQLite function
    45     45   ** sqlite3FileSuffix3(). It modifies the filename in buffer z in the
    46     46   ** same way as SQLite does when in 8.3 filenames mode.
    47     47   */
    48     48   static void sqlite3Delete83Name(char *z){
    49     49     int i, sz;
    50         -  sz = strlen(z);
           50  +  sz = (int)strlen(z);
    51     51     for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
    52     52     if( z[i]=='.' && (sz>i+4) ) memmove(&z[i+1], &z[sz-3], 4);
    53     53   }
    54     54   
    55     55   /*
    56     56   ** zFile is a filename. Assuming no error occurs, if this file exists, 
    57     57   ** set *pbExists to true and unlink it. Or, if the file does not exist,
................................................................................
   101    101       { "%s%03d",         0,   1 },
   102    102       { "%s-journal%03d", SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET, 1 },
   103    103       { "%s-wal%03d",     SQLITE_MULTIPLEX_WAL_8_3_OFFSET, 1 },
   104    104     };
   105    105   
   106    106     /* Allocate a buffer large enough for any of the files that need to be
   107    107     ** deleted.  */
   108         -  nBuf = strlen(zFile) + 100;
          108  +  nBuf = (int)strlen(zFile) + 100;
   109    109     zBuf = (char*)sqlite3_malloc(nBuf);
   110    110     if( zBuf==0 ) return SQLITE_NOMEM;
   111    111   
   112    112     /* Delete both the regular and 8.3 filenames versions of the database,
   113    113     ** journal, wal and shm files.  */
   114    114     for(i=0; rc==0 && i<sizeof(azFmt)/sizeof(azFmt[0]); i++){
   115    115       sqlite3_snprintf(nBuf, zBuf, azFmt[i], zFile);