/ Check-in [31fe1985]
Login

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

Overview
Comment:Fix harmless Clang warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 31fe1985ad6be5eb04bbe85da378c2385c503ceb
User & Date: drh 2012-06-06 23:59:36
Context
2012-06-07
02:35
Provide an (undocumented) compile-time option to disable the page cache overflow counter, in order to avoid a mutex. check-in: 208825cd user: drh tags: trunk
2012-06-06
23:59
Fix harmless Clang warnings. check-in: 31fe1985 user: drh tags: trunk
23:25
Fix an #if that is applicable to WinRT, even thought it is currently disabled by another #if. check-in: baa8b783 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  4442   4442     assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) );
  4443   4443   
  4444   4444     /* Fill in the Pager.zFilename and Pager.zJournal buffers, if required. */
  4445   4445     if( zPathname ){
  4446   4446       assert( nPathname>0 );
  4447   4447       pPager->zJournal =   (char*)(pPtr += nPathname + 1 + nUri);
  4448   4448       memcpy(pPager->zFilename, zPathname, nPathname);
  4449         -    memcpy(&pPager->zFilename[nPathname+1], zUri, nUri);
         4449  +    if( nUri ) memcpy(&pPager->zFilename[nPathname+1], zUri, nUri);
  4450   4450       memcpy(pPager->zJournal, zPathname, nPathname);
  4451   4451       memcpy(&pPager->zJournal[nPathname], "-journal\000", 8+1);
  4452   4452       sqlite3FileSuffix3(pPager->zFilename, pPager->zJournal);
  4453   4453   #ifndef SQLITE_OMIT_WAL
  4454   4454       pPager->zWal = &pPager->zJournal[nPathname+8+1];
  4455   4455       memcpy(pPager->zWal, zPathname, nPathname);
  4456   4456       memcpy(&pPager->zWal[nPathname], "-wal\000", 4+1);

Changes to tool/warnings-clang.sh.

     3      3   # Run this script in a directory with a working makefile to check for 
     4      4   # compiler warnings in SQLite.
     5      5   #
     6      6   rm -f sqlite3.c
     7      7   make sqlite3.c
     8      8   echo '************* FTS4 and RTREE ****************'
     9      9   scan-build gcc -c -DHAVE_STDINT_H -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE \
    10         -      -DSQLITE_DEBUG sqlite3.c 2>&1 | grep -v 'ANALYZE:'
           10  +      -DSQLITE_DEBUG -DSQLITE_ENABLE_STAT3 sqlite3.c 2>&1 | grep -v 'ANALYZE:'
    11     11   echo '********** ENABLE_STAT3. THREADSAFE=0 *******'
    12     12   scan-build gcc -c -I. -DSQLITE_ENABLE_STAT3 -DSQLITE_THREADSAFE=0 \
    13     13         -DSQLITE_DEBUG \
    14     14         sqlite3.c ../sqlite/src/shell.c -ldl 2>&1 | grep -v 'ANALYZE:'