/ Check-in [a2373e54]
Login

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

Overview
Comment:Suppress some compiler warnings (where possible). Ticket #3696. (CVS 6331)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a2373e5409e4e59903f315a4446db8cb6ba000cc
User & Date: drh 2009-03-01 22:29:20
Context
2009-03-02
01:22
Fix a bug in the GROUP BY alias name resolution. The bug was by check-in (6305). Discovered by regression test on 64-bit linux. Test cases added so that the problems is detected on 32-bit systems. (CVS 6332) check-in: fa000850 user: drh tags: trunk
2009-03-01
22:29
Suppress some compiler warnings (where possible). Ticket #3696. (CVS 6331) check-in: a2373e54 user: drh tags: trunk
19:42
Fix a critical bug in the VDBE opcode array resizer introduced by check-in (6307). Bug detected by regression testing. (CVS 6330) check-in: ec3b18ac user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

    39     39   **   *  Definitions of sqlite3_io_methods objects for all locking
    40     40   **      methods plus "finder" functions for each locking method.
    41     41   **   *  sqlite3_vfs method implementations.
    42     42   **   *  Locking primitives for the proxy uber-locking-method. (MacOSX only)
    43     43   **   *  Definitions of sqlite3_vfs objects for all locking methods
    44     44   **      plus implementations of sqlite3_os_init() and sqlite3_os_end().
    45     45   **
    46         -** $Id: os_unix.c,v 1.241 2009/02/09 17:34:07 drh Exp $
           46  +** $Id: os_unix.c,v 1.242 2009/03/01 22:29:20 drh Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #if SQLITE_OS_UNIX              /* This file is used on unix only */
    50     50   
    51     51   /*
    52     52   ** There are various methods for file locking used for concurrency
    53     53   ** control:
................................................................................
  3980   3980   static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){
  3981   3981   #if OS_VXWORKS
  3982   3982     struct timespec sp;
  3983   3983   
  3984   3984     sp.tv_sec = microseconds / 1000000;
  3985   3985     sp.tv_nsec = (microseconds % 1000000) * 1000;
  3986   3986     nanosleep(&sp, NULL);
         3987  +  UNUSED_PARAMETER(NotUsed);
  3987   3988     return microseconds;
  3988   3989   #elif defined(HAVE_USLEEP) && HAVE_USLEEP
  3989   3990     usleep(microseconds);
         3991  +  UNUSED_PARAMETER(NotUsed);
  3990   3992     return microseconds;
  3991   3993   #else
  3992   3994     int seconds = (microseconds+999999)/1000000;
  3993   3995     sleep(seconds);
         3996  +  UNUSED_PARAMETER(NotUsed);
  3994   3997     return seconds*1000000;
  3995   3998   #endif
  3996         -  UNUSED_PARAMETER(NotUsed);
  3997   3999   }
  3998   4000   
  3999   4001   /*
  4000   4002   ** The following variable, if set to a non-zero value, is interpreted as
  4001   4003   ** the number of seconds since 1970 and is used to set the result of
  4002   4004   ** sqlite3OsCurrentTime() during testing.
  4003   4005   */

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.248 2009/02/04 03:59:25 shane Exp $
           17  +** $Id: util.c,v 1.249 2009/03/01 22:29:20 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <stdarg.h>
    21     21   
    22     22   /*
    23     23   ** Routine needed to support the testcase() macro.
    24     24   */
................................................................................
   690    690   
   691    691     p++;
   692    692     a = a<<14;
   693    693     a |= *p;
   694    694     /* a: p2<<28 | p4<<14 | p6 (unmasked) */
   695    695     if (!(a&0x80))
   696    696     {
   697         -    a &= (0x7f<<28)|(0x7f<<14)|(0x7f);
          697  +    a &= (0x1f<<28)|(0x7f<<14)|(0x7f);
   698    698       b &= (0x7f<<14)|(0x7f);
   699    699       b = b<<7;
   700    700       a |= b;
   701    701       s = s>>11;
   702    702       *v = ((u64)s)<<32 | a;
   703    703       return 7;
   704    704     }
................................................................................
   707    707     a &= (0x7f<<14)|(0x7f);
   708    708     p++;
   709    709     b = b<<14;
   710    710     b |= *p;
   711    711     /* b: p3<<28 | p5<<14 | p7 (unmasked) */
   712    712     if (!(b&0x80))
   713    713     {
   714         -    b &= (0x7f<<28)|(0x7f<<14)|(0x7f);
          714  +    b &= (0x1f<<28)|(0x7f<<14)|(0x7f);
   715    715       /* moved CSE2 up */
   716    716       /* a &= (0x7f<<14)|(0x7f); */
   717    717       a = a<<7;
   718    718       a |= b;
   719    719       s = s>>4;
   720    720       *v = ((u64)s)<<32 | a;
   721    721       return 8;
................................................................................
   802    802   
   803    803     p++;
   804    804     a = a<<14;
   805    805     a |= *p;
   806    806     /* a: p0<<28 | p2<<14 | p4 (unmasked) */
   807    807     if (!(a&0x80))
   808    808     {
   809         -    a &= (0x7f<<28)|(0x7f<<14)|(0x7f);
   810         -    b &= (0x7f<<28)|(0x7f<<14)|(0x7f);
          809  +    a &= (0x1f<<28)|(0x7f<<14)|(0x7f);
          810  +    b &= (0x1f<<28)|(0x7f<<14)|(0x7f);
   811    811       b = b<<7;
   812    812       *v = a | b;
   813    813       return 5;
   814    814     }
   815    815   
   816    816     /* We can only reach this point when reading a corrupt database
   817    817     ** file.  In that case we are not in any hurry.  Use the (relatively