/ Check-in [c829868a]
Login

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

Overview
Comment:Fix two compiler warnings. No functional code changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c829868aa2254c5e2268cdb803462cc6ec5cb71e
User & Date: drh 2011-03-08 13:06:41
Context
2011-03-08
14:05
Unix errno integer can vary from one system to the next. So do not depend on specific errno values in test cases. check-in: ddb747d3 user: drh tags: trunk
13:06
Fix two compiler warnings. No functional code changes. check-in: c829868a user: drh tags: trunk
02:38
Fix additional cases of possible signed integer overflow, especially with regard to negation. check-in: 2d5800bd user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

  1353   1353       **  2:   [....W]
  1354   1354       **  3:   [RRRRW]
  1355   1355       **  4:   [RRRR.]
  1356   1356       */
  1357   1357       if( eFileLock==SHARED_LOCK ){
  1358   1358   
  1359   1359   #if !defined(__APPLE__) || !SQLITE_ENABLE_LOCKING_STYLE
         1360  +      (void)handleNFSUnlock;
  1360   1361         assert( handleNFSUnlock==0 );
  1361   1362   #endif
  1362   1363   #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  1363   1364         if( handleNFSUnlock ){
  1364   1365           off_t divSize = SHARED_SIZE - 1;
  1365   1366           
  1366   1367           lock.l_type = F_UNLCK;

Changes to src/util.c.

  1141   1141   
  1142   1142   /*
  1143   1143   ** Compute the absolute value of a 32-bit signed integer, of possible.  Or 
  1144   1144   ** if the integer has a value of -2147483648, return +2147483647
  1145   1145   */
  1146   1146   int sqlite3AbsInt32(int x){
  1147   1147     if( x>=0 ) return x;
  1148         -  if( x==0x80000000 ) return 0x7fffffff;
         1148  +  if( x==(int)0x80000000 ) return 0x7fffffff;
  1149   1149     return -x;
  1150   1150   }