/ Check-in [b7d0ec83]
Login

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

Overview
Comment:fix the compile warnings on OS/2 (CVS 5950)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b7d0ec838b806e7b2532bef1d59279c32fb206d3
User & Date: pweilbacher 2008-11-22 19:50:54
Context
2008-11-24
15:32
Added test case to in4.test to try and duplicate crash reported on the mailing list. (CVS 5951) check-in: 8502fba3 user: shane tags: trunk
2008-11-22
19:50
fix the compile warnings on OS/2 (CVS 5950) check-in: b7d0ec83 user: pweilbacher tags: trunk
18:28
Make sure the error message handler is able to deal with NULL expression spans. Ticket #3508. (CVS 5949) check-in: ce36b647 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mutex_os2.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains the C functions that implement mutexes for OS/2
    13     13   **
    14         -** $Id: mutex_os2.c,v 1.10 2008/06/23 22:13:28 pweilbacher Exp $
           14  +** $Id: mutex_os2.c,v 1.11 2008/11/22 19:50:54 pweilbacher Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   
    18     18   /*
    19     19   ** The code in this file is only used if SQLITE_MUTEX_OS2 is defined.
    20     20   ** See the mutex.h file for details.
    21     21   */
................................................................................
   118    118           DosGetInfoBlocks( &ptib, &ppib );
   119    119           sqlite3_snprintf( sizeof(name), name, "\\SEM32\\SQLITE%04x",
   120    120                             ppib->pib_ulpid );
   121    121           while( !isInit ){
   122    122             mutex = 0;
   123    123             rc = DosCreateMutexSem( name, &mutex, 0, FALSE);
   124    124             if( rc == NO_ERROR ){
   125         -            int i;
          125  +            unsigned int i;
   126    126               if( !isInit ){
   127    127                 for( i = 0; i < sizeof(staticMutexes)/sizeof(staticMutexes[0]); i++ ){
   128    128                   DosCreateMutexSem( 0, &staticMutexes[i].mutex, 0, FALSE );
   129    129                 }
   130    130                 isInit = 1;
   131    131               }
   132    132               DosCloseMutexSem( mutex );

Changes to src/os_os2.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to OS/2.
    14     14   **
    15         -** $Id: os_os2.c,v 1.59 2008/11/18 23:03:40 pweilbacher Exp $
           15  +** $Id: os_os2.c,v 1.60 2008/11/22 19:50:54 pweilbacher Exp $
    16     16   */
    17     17   
    18     18   #include "sqliteInt.h"
    19     19   
    20     20   #if SQLITE_OS_OS2
    21     21   
    22     22   /*
................................................................................
   962    962   #endif
   963    963   
   964    964   
   965    965   /*
   966    966   ** Write up to nBuf bytes of randomness into zBuf.
   967    967   */
   968    968   static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){
   969         -  ULONG sizeofULong = sizeof(ULONG);
          969  +  int sizeofULong = sizeof(ULONG);
   970    970     int n = 0;
   971         -  if( sizeof(DATETIME) <= nBuf - n ){
          971  +  if( (int)sizeof(DATETIME) <= nBuf - n ){
   972    972       DATETIME x;
   973    973       DosGetDateTime(&x);
   974    974       memcpy(&zBuf[n], &x, sizeof(x));
   975    975       n += sizeof(x);
   976    976     }
   977    977   
   978    978     if( sizeofULong <= nBuf - n ){