/ Check-in [618f248f]
Login

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

Overview
Comment:Fix harmless compiler warning in unixUnfetch().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 618f248f4ea9fb0b6ff019a4c2cd72857389301f
User & Date: drh 2014-01-09 13:39:07
Context
2014-01-10
16:40
Fix another harmless compiler warning in unixUnfetch(). check-in: 0484549b user: dan tags: trunk
2014-01-09
13:39
Fix harmless compiler warning in unixUnfetch(). check-in: 618f248f user: drh tags: trunk
2014-01-04
20:00
Fix an typo that breaks the build when SQLITE_ENABLE_TREE_EXPLAIN is defined. check-in: f461e2b3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

  4844   4844   ** argument that was passed to the unixFetch() invocation. 
  4845   4845   **
  4846   4846   ** Or, if the third argument is NULL, then this function is being called 
  4847   4847   ** to inform the VFS layer that, according to POSIX, any existing mapping 
  4848   4848   ** may now be invalid and should be unmapped.
  4849   4849   */
  4850   4850   static int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){
  4851         -  unixFile *pFd = (unixFile *)fd;   /* The underlying database file */
  4852   4851     UNUSED_PARAMETER(iOff);
  4853         -
  4854   4852   #if SQLITE_MAX_MMAP_SIZE>0
         4853  +  unixFile *pFd = (unixFile *)fd;   /* The underlying database file */
         4854  +
  4855   4855     /* If p==0 (unmap the entire file) then there must be no outstanding 
  4856   4856     ** xFetch references. Or, if p!=0 (meaning it is an xFetch reference),
  4857   4857     ** then there must be at least one outstanding.  */
  4858   4858     assert( (p==0)==(pFd->nFetchOut==0) );
  4859   4859   
  4860   4860     /* If p!=0, it must match the iOff value. */
  4861   4861     assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
................................................................................
  4863   4863     if( p ){
  4864   4864       pFd->nFetchOut--;
  4865   4865     }else{
  4866   4866       unixUnmapfile(pFd);
  4867   4867     }
  4868   4868   
  4869   4869     assert( pFd->nFetchOut>=0 );
         4870  +#else
         4871  +  UNUSED_PARAMETER(fd);
         4872  +  UNUSED_PARAMETER(p);
  4870   4873   #endif
  4871   4874     return SQLITE_OK;
  4872   4875   }
  4873   4876   
  4874   4877   /*
  4875   4878   ** Here ends the implementation of all sqlite3_file methods.
  4876   4879   **