/ Check-in [7653973a]
Login

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

Overview
Comment:Silence harmless compiler warnings in the test code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7653973a525638b5e5e70ea8459f64e1a88befca
User & Date: drh 2012-08-20 16:08:29
Context
2012-08-20
16:23
Change the checkSpacing utility program to ignore whitespace at end-of-line unless the --wseol option is used. check-in: be1faade user: drh tags: trunk
16:08
Silence harmless compiler warnings in the test code. check-in: 7653973a user: drh tags: trunk
15:53
Remove tab characters from source code files. Replace them with spaces. check-in: 7edd10a9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test1.c.

  5924   5924     int objc,
  5925   5925     Tcl_Obj *CONST objv[]
  5926   5926   ){
  5927   5927     int i;
  5928   5928     sqlite3 *db;
  5929   5929     const char *zOpt;
  5930   5930     int onoff;
  5931         -  int mask;
         5931  +  int mask = 0;
  5932   5932     static const struct {
  5933   5933       const char *zOptName;
  5934   5934       int mask;
  5935   5935     } aOpt[] = {
  5936   5936       { "all",              SQLITE_OptMask        },
  5937   5937       { "query-flattener",  SQLITE_QueryFlattener },
  5938   5938       { "column-cache",     SQLITE_ColumnCache    },

Changes to src/test_multiplex.c.

   498    498     const char *zName,         /* Name of file to be opened */
   499    499     sqlite3_file *pConn,       /* Fill in this file descriptor */
   500    500     int flags,                 /* Flags to control the opening */
   501    501     int *pOutFlags             /* Flags showing results of opening */
   502    502   ){
   503    503     int rc = SQLITE_OK;                  /* Result code */
   504    504     multiplexConn *pMultiplexOpen;       /* The new multiplex file descriptor */
   505         -  multiplexGroup *pGroup;              /* Corresponding multiplexGroup object */
          505  +  multiplexGroup *pGroup = 0;          /* Corresponding multiplexGroup object */
   506    506     sqlite3_file *pSubOpen = 0;                    /* Real file descriptor */
   507    507     sqlite3_vfs *pOrigVfs = gMultiplex.pOrigVfs;   /* Real VFS */
   508         -  int nName;
   509         -  int sz;
          508  +  int nName = 0;
          509  +  int sz = 0;
   510    510     char *zToFree = 0;
   511    511   
   512    512     UNUSED_PARAMETER(pVfs);
   513    513     memset(pConn, 0, pVfs->szOsFile);
   514    514     assert( zName || (flags & SQLITE_OPEN_DELETEONCLOSE) );
   515    515   
   516    516     /* We need to create a group structure and manage

Changes to src/test_spellfix.c.

   655    655     sqlite3 *db,            /* Load from this database */
   656    656     const char *zTable      /* Name of the table from which to load */
   657    657   ){
   658    658     sqlite3_stmt *pStmt;
   659    659     int rc, rc2;
   660    660     char *zSql;
   661    661     int iLangPrev = -9999;
   662         -  EditDist3Lang *pLang;
          662  +  EditDist3Lang *pLang = 0;
   663    663   
   664    664     zSql = sqlite3_mprintf("SELECT iLang, cFrom, cTo, iCost"
   665    665                            " FROM \"%w\" WHERE iLang>=0 ORDER BY iLang", zTable);
   666    666     if( zSql==0 ) return SQLITE_NOMEM;
   667    667     rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
   668    668     sqlite3_free(zSql);
   669    669     if( rc ) return rc;
................................................................................
   676    676       int nTo = zTo ? sqlite3_column_bytes(pStmt, 2) : 0;
   677    677       int iCost = sqlite3_column_int(pStmt, 3);
   678    678   
   679    679       assert( zFrom!=0 || nFrom==0 );
   680    680       assert( zTo!=0 || nTo==0 );
   681    681       if( nFrom>100 || nTo>100 ) continue;
   682    682       if( iCost<0 ) continue;
   683         -    if( iLang!=iLangPrev ){
          683  +    if( pLang==0 || iLang!=iLangPrev ){
   684    684         EditDist3Lang *pNew;
   685    685         pNew = sqlite3_realloc(p->a, (p->nLang+1)*sizeof(p->a[0]));
   686    686         if( pNew==0 ){ rc = SQLITE_NOMEM; break; }
   687    687         p->a = pNew;
   688    688         pLang = &p->a[p->nLang];
   689    689         p->nLang++;
   690    690         pLang->iLang = iLang;