/ Check-in [7be03ecc]
Login

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

Overview
Comment:Fix several harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7be03ecc04235420e54fed8a88742243278de160
User & Date: drh 2010-09-28 14:26:36
Context
2010-09-28
15:25
Updates to e_vacuum.test so that it works when SQLITE_DEFAULT_AUTOVACUUM=1 is set. check-in: 890816c5 user: drh tags: trunk
14:26
Fix several harmless compiler warnings. check-in: 7be03ecc user: drh tags: trunk
14:11
Fix an incompatibility with OMIT_VIRTUALTABLE in e_vacuum.test. check-in: 7d0b881a user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/analyze.c.

   109    109     sqlite3 *db = pParse->db;    /* Database handle */
   110    110     Index *pIdx;                 /* An index to being analyzed */
   111    111     int iIdxCur;                 /* Cursor open on index being analyzed */
   112    112     Vdbe *v;                     /* The virtual machine being built up */
   113    113     int i;                       /* Loop counter */
   114    114     int topOfLoop;               /* The top of the loop */
   115    115     int endOfLoop;               /* The end of the loop */
   116         -  int addr;                    /* The address of an instruction */
          116  +  int addr = 0;                /* The address of an instruction */
   117    117     int jZeroRows = 0;           /* Jump from here if number of rows is zero */
   118    118     int iDb;                     /* Index of database containing pTab */
   119    119     int regTabname = iMem++;     /* Register containing table name */
   120    120     int regIdxname = iMem++;     /* Register containing index name */
   121    121     int regSampleno = iMem++;    /* Register containing next sample number */
   122    122     int regCol = iMem++;         /* Content of a column analyzed table */
   123    123     int regRec = iMem++;         /* Register holding completed record */

Changes to src/attach.c.

   362    362       0,                /* flags */
   363    363       0,                /* pUserData */
   364    364       0,                /* pNext */
   365    365       detachFunc,       /* xFunc */
   366    366       0,                /* xStep */
   367    367       0,                /* xFinalize */
   368    368       "sqlite_detach",  /* zName */
   369         -    0                 /* pHash */
          369  +    0,                /* pHash */
          370  +    0                 /* pDestructor */
   370    371     };
   371    372     codeAttach(pParse, SQLITE_DETACH, &detach_func, pDbname, 0, 0, pDbname);
   372    373   }
   373    374   
   374    375   /*
   375    376   ** Called by the parser to compile an ATTACH statement.
   376    377   **
................................................................................
   383    384       0,                /* flags */
   384    385       0,                /* pUserData */
   385    386       0,                /* pNext */
   386    387       attachFunc,       /* xFunc */
   387    388       0,                /* xStep */
   388    389       0,                /* xFinalize */
   389    390       "sqlite_attach",  /* zName */
   390         -    0                 /* pHash */
          391  +    0,                /* pHash */
          392  +    0                 /* pDestructor */
   391    393     };
   392    394     codeAttach(pParse, SQLITE_ATTACH, &attach_func, p, p, pDbname, pKey);
   393    395   }
   394    396   #endif /* SQLITE_OMIT_ATTACH */
   395    397   
   396    398   /*
   397    399   ** Initialize a DbFixer structure.  This routine must be called prior

Changes to src/func.c.

  1533   1533       FUNCTION(round,              2, 0, 0, roundFunc        ),
  1534   1534   #endif
  1535   1535       FUNCTION(upper,              1, 0, 0, upperFunc        ),
  1536   1536       FUNCTION(lower,              1, 0, 0, lowerFunc        ),
  1537   1537       FUNCTION(coalesce,           1, 0, 0, 0                ),
  1538   1538       FUNCTION(coalesce,           0, 0, 0, 0                ),
  1539   1539   /*  FUNCTION(coalesce,          -1, 0, 0, ifnullFunc       ), */
  1540         -    {-1,SQLITE_UTF8,SQLITE_FUNC_COALESCE,0,0,ifnullFunc,0,0,"coalesce",0},
         1540  +    {-1,SQLITE_UTF8,SQLITE_FUNC_COALESCE,0,0,ifnullFunc,0,0,"coalesce",0,0},
  1541   1541       FUNCTION(hex,                1, 0, 0, hexFunc          ),
  1542   1542   /*  FUNCTION(ifnull,             2, 0, 0, ifnullFunc       ), */
  1543         -    {2,SQLITE_UTF8,SQLITE_FUNC_COALESCE,0,0,ifnullFunc,0,0,"ifnull",0},
         1543  +    {2,SQLITE_UTF8,SQLITE_FUNC_COALESCE,0,0,ifnullFunc,0,0,"ifnull",0,0},
  1544   1544       FUNCTION(random,             0, 0, 0, randomFunc       ),
  1545   1545       FUNCTION(randomblob,         1, 0, 0, randomBlob       ),
  1546   1546       FUNCTION(nullif,             2, 0, 1, nullifFunc       ),
  1547   1547       FUNCTION(sqlite_version,     0, 0, 0, versionFunc      ),
  1548   1548       FUNCTION(sqlite_source_id,   0, 0, 0, sourceidFunc     ),
  1549   1549   #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
  1550   1550       FUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc  ),
................................................................................
  1563   1563       FUNCTION(load_extension,     1, 0, 0, loadExt          ),
  1564   1564       FUNCTION(load_extension,     2, 0, 0, loadExt          ),
  1565   1565     #endif
  1566   1566       AGGREGATE(sum,               1, 0, 0, sumStep,         sumFinalize    ),
  1567   1567       AGGREGATE(total,             1, 0, 0, sumStep,         totalFinalize    ),
  1568   1568       AGGREGATE(avg,               1, 0, 0, sumStep,         avgFinalize    ),
  1569   1569    /* AGGREGATE(count,             0, 0, 0, countStep,       countFinalize  ), */
  1570         -    {0,SQLITE_UTF8,SQLITE_FUNC_COUNT,0,0,0,countStep,countFinalize,"count",0},
         1570  +    {0,SQLITE_UTF8,SQLITE_FUNC_COUNT,0,0,0,countStep,countFinalize,"count",0,0},
  1571   1571       AGGREGATE(count,             1, 0, 0, countStep,       countFinalize  ),
  1572   1572       AGGREGATE(group_concat,      1, 0, 0, groupConcatStep, groupConcatFinalize),
  1573   1573       AGGREGATE(group_concat,      2, 0, 0, groupConcatStep, groupConcatFinalize),
  1574   1574     
  1575   1575       LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
  1576   1576     #ifdef SQLITE_CASE_SENSITIVE_LIKE
  1577   1577       LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),

Changes to src/malloc.c.

    67     67     u32 nScratchFree;
    68     68   
    69     69     /*
    70     70     ** True if heap is nearly "full" where "full" is defined by the
    71     71     ** sqlite3_soft_heap_limit() setting.
    72     72     */
    73     73     int nearlyFull;
    74         -} mem0 = { 0, 0, 0, 0, 0, 0, 0 };
           74  +} mem0 = { 0, 0, 0, 0, 0, 0, 0, 0 };
    75     75   
    76     76   #define mem0 GLOBAL(struct Mem0Global, mem0)
    77     77   
    78     78   /*
    79     79   ** This routine runs when the memory allocator sees that the
    80     80   ** total memory allocation is about to exceed the soft heap
    81     81   ** limit.

Changes to src/sqliteInt.h.

  1020   1020   **     function likeFunc. Argument pArg is cast to a (void *) and made
  1021   1021   **     available as the function user-data (sqlite3_user_data()). The
  1022   1022   **     FuncDef.flags variable is set to the value passed as the flags
  1023   1023   **     parameter.
  1024   1024   */
  1025   1025   #define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
  1026   1026     {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \
  1027         -   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0}
         1027  +   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
  1028   1028   #define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \
  1029   1029     {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \
  1030         -   pArg, 0, xFunc, 0, 0, #zName, 0}
         1030  +   pArg, 0, xFunc, 0, 0, #zName, 0, 0}
  1031   1031   #define LIKEFUNC(zName, nArg, arg, flags) \
  1032         -  {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0}
         1032  +  {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0}
  1033   1033   #define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \
  1034   1034     {nArg, SQLITE_UTF8, nc*SQLITE_FUNC_NEEDCOLL, \
  1035         -   SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0}
         1035  +   SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
  1036   1036   
  1037   1037   /*
  1038   1038   ** All current savepoints are stored in a linked list starting at
  1039   1039   ** sqlite3.pSavepoint. The first element in the list is the most recently
  1040   1040   ** opened savepoint. Savepoints are added to the list by the vdbe
  1041   1041   ** OP_Savepoint instruction.
  1042   1042   */