/ Check-in [93bdbc5e]
Login

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

Overview
Comment:Fix compiler warning found with gcc -Wextra. (CVS 6614)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 93bdbc5e2f9771a30358cde03f0d3cb708d73d48
User & Date: drh 2009-05-06 19:03:14
Context
2009-05-07
02:26
Version 3.6.14 (CVS 6615) check-in: 469ad1de user: drh tags: trunk, release
2009-05-06
19:03
Fix compiler warning found with gcc -Wextra. (CVS 6614) check-in: 93bdbc5e user: drh tags: trunk
18:57
Changes to silence compiler warnings under MSVC. (CVS 6613) check-in: df599237 user: shane tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.547 2009/05/06 18:57:10 shane Exp $
           17  +** $Id: main.c,v 1.548 2009/05/06 19:03:14 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   
    21     21   #ifdef SQLITE_ENABLE_FTS3
    22     22   # include "fts3.h"
    23     23   #endif
    24     24   #ifdef SQLITE_ENABLE_RTREE
................................................................................
   764    764       /* SQLITE_NOLFS       */ "large file support is disabled",
   765    765       /* SQLITE_AUTH        */ "authorization denied",
   766    766       /* SQLITE_FORMAT      */ "auxiliary database format error",
   767    767       /* SQLITE_RANGE       */ "bind or column index out of range",
   768    768       /* SQLITE_NOTADB      */ "file is encrypted or is not a database",
   769    769     };
   770    770     rc &= 0xff;
   771         -  if( ALWAYS(rc>=0) && rc<sizeof(aMsg)/sizeof(aMsg[0]) && aMsg[rc]!=0 ){
          771  +  if( ALWAYS(rc>=0) && rc<(int)(sizeof(aMsg)/sizeof(aMsg[0])) && aMsg[rc]!=0 ){
   772    772       return aMsg[rc];
   773    773     }else{
   774    774       return "unknown error";
   775    775     }
   776    776   }
   777    777   
   778    778   /*

Changes to src/util.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Utility functions used throughout sqlite.
    13     13   **
    14     14   ** This file contains functions for allocating memory, comparing
    15     15   ** strings, and stuff like that.
    16     16   **
    17         -** $Id: util.c,v 1.253 2009/05/03 20:23:54 drh Exp $
           17  +** $Id: util.c,v 1.254 2009/05/06 19:03:14 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <stdarg.h>
    21         -#include <math.h>
           21  +#ifdef SQLITE_HAVE_ISNAN
           22  +# include <math.h>
           23  +#endif
    22     24   
    23     25   /*
    24     26   ** Routine needed to support the testcase() macro.
    25     27   */
    26     28   #ifdef SQLITE_COVERAGE_TEST
    27     29   void sqlite3Coverage(int x){
    28     30     static int dummy = 0;

Changes to src/where.c.

    12     12   ** This module contains C code that generates VDBE code used to process
    13     13   ** the WHERE clause of SQL statements.  This module is responsible for
    14     14   ** generating the code that loops through a table looking for applicable
    15     15   ** rows.  Indices are selected and used to speed the search when doing
    16     16   ** so is applicable.  Because this module is responsible for selecting
    17     17   ** indices, you might also think of this module as the "query optimizer".
    18     18   **
    19         -** $Id: where.c,v 1.395 2009/05/06 18:57:10 shane Exp $
           19  +** $Id: where.c,v 1.396 2009/05/06 19:03:14 drh Exp $
    20     20   */
    21     21   #include "sqliteInt.h"
    22     22   
    23     23   /*
    24     24   ** Trace output macros
    25     25   */
    26     26   #if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
................................................................................
  3102   3102     WhereMaskSet *pMaskSet;    /* The expression mask set */
  3103   3103     WhereClause *pWC;               /* Decomposition of the WHERE clause */
  3104   3104     struct SrcList_item *pTabItem;  /* A single entry from pTabList */
  3105   3105     WhereLevel *pLevel;             /* A single level in the pWInfo list */
  3106   3106     int iFrom;                      /* First unused FROM clause element */
  3107   3107     int andFlags;              /* AND-ed combination of all pWC->a[].wtFlags */
  3108   3108     sqlite3 *db;               /* Database connection */
  3109         -  ExprList *pOrderBy = 0;
  3110   3109   
  3111   3110     /* The number of tables in the FROM clause is limited by the number of
  3112   3111     ** bits in a Bitmask 
  3113   3112     */
  3114   3113     if( pTabList->nSrc>BMS ){
  3115   3114       sqlite3ErrorMsg(pParse, "at most %d tables in a join", BMS);
  3116   3115       return 0;
  3117   3116     }
  3118   3117   
  3119         -  if( ppOrderBy ){
  3120         -    pOrderBy = *ppOrderBy;
  3121         -  }
  3122         -
  3123   3118     /* Allocate and initialize the WhereInfo structure that will become the
  3124   3119     ** return value. A single allocation is used to store the WhereInfo
  3125   3120     ** struct, the contents of WhereInfo.a[], the WhereClause structure
  3126   3121     ** and the WhereMaskSet structure. Since WhereClause contains an 8-byte
  3127   3122     ** field (type Bitmask) it must be aligned on an 8-byte boundary on
  3128   3123     ** some architectures. Hence the ROUND8() below.
  3129   3124     */