Fix harmless compiler warnings. (CVS 5073)

FossilOrigin-Name: 227a6f67c21c87a7cf98f84b9d57a6dc9da93ebb
diff --git a/src/loadext.c b/src/loadext.c
index d42bc4e..8f1a864 100644
--- a/src/loadext.c
+++ b/src/loadext.c
@@ -469,7 +469,9 @@
 int sqlite3_auto_extension(void *xInit){
   int i;
   int rc = SQLITE_OK;
+#ifndef SQLITE_MUTEX_NOOP
   sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
   sqlite3_mutex_enter(mutex);
   for(i=0; i<autoext.nExt; i++){
     if( autoext.aExt[i]==xInit ) break;
@@ -495,7 +497,9 @@
 ** Reset the automatic extension loading mechanism.
 */
 void sqlite3_reset_auto_extension(void){
+#ifndef SQLITE_MUTEX_NOOP
   sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
   sqlite3_mutex_enter(mutex);
   sqlite3_free(autoext.aExt);
   autoext.aExt = 0;
@@ -518,7 +522,9 @@
   }
   for(i=0; go; i++){
     char *zErrmsg = 0;
+#ifndef SQLITE_MUTEX_NOOP
     sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
     sqlite3_mutex_enter(mutex);
     if( i>=autoext.nExt ){
       xInit = 0;
diff --git a/src/main.c b/src/main.c
index 25c7947..2ed200b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: main.c,v 1.436 2008/04/28 20:35:49 drh Exp $
+** $Id: main.c,v 1.437 2008/05/01 17:03:49 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -30,6 +30,7 @@
 int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
 int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
 
+#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
 /*
 ** If the following function pointer is not NULL and if
 ** SQLITE_ENABLE_IOTRACE is enabled, then messages describing
@@ -37,6 +38,7 @@
 ** are intended for debugging activity only.
 */
 void (*sqlite3IoTrace)(const char*, ...) = 0;
+#endif
 
 /*
 ** If the following global variable points to a string which is the
diff --git a/src/pager.c b/src/pager.c
index 83593d1..89d6140 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.436 2008/04/29 15:38:59 drh Exp $
+** @(#) $Id: pager.c,v 1.437 2008/05/01 17:03:49 drh Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
@@ -4368,29 +4368,6 @@
 }
 #endif
 
-#ifndef SQLITE_OMIT_VACUUM
-/*
-** Replace the content of a single page with the information in the third
-** argument.
-*/
-int sqlite3PagerOverwrite(Pager *pPager, Pgno pgno, void *pData){
-  PgHdr *pPg;
-  int rc;
-
-  pagerEnter(pPager);
-  rc = sqlite3PagerGet(pPager, pgno, &pPg);
-  if( rc==SQLITE_OK ){
-    rc = sqlite3PagerWrite(pPg);
-    if( rc==SQLITE_OK ){
-      memcpy(sqlite3PagerGetData(pPg), pData, pPager->pageSize);
-    }
-    sqlite3PagerUnref(pPg);
-  }
-  pagerLeave(pPager);
-  return rc;
-}
-#endif
-
 /*
 ** A call to this routine tells the pager that it is not necessary to
 ** write the information on page pPg back to the disk, even though
diff --git a/src/pager.h b/src/pager.h
index 9b65960..da61cc1 100644
--- a/src/pager.h
+++ b/src/pager.h
@@ -13,7 +13,7 @@
 ** subsystem.  The page cache subsystem reads and writes a file a page
 ** at a time and provides a journal for rollback.
 **
-** @(#) $Id: pager.h,v 1.71 2008/04/17 17:02:01 drh Exp $
+** @(#) $Id: pager.h,v 1.72 2008/05/01 17:03:49 drh Exp $
 */
 
 #ifndef _PAGER_H_
@@ -77,7 +77,6 @@
 int sqlite3PagerRef(DbPage*);
 int sqlite3PagerUnref(DbPage*);
 int sqlite3PagerWrite(DbPage*);
-int sqlite3PagerOverwrite(Pager *pPager, Pgno pgno, void*);
 int sqlite3PagerPagecount(Pager*);
 int sqlite3PagerTruncate(Pager*,Pgno);
 int sqlite3PagerBegin(DbPage*, int exFlag);
diff --git a/src/select.c b/src/select.c
index 4c9a01e..b8eb6f9 100644
--- a/src/select.c
+++ b/src/select.c
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle SELECT statements in SQLite.
 **
-** $Id: select.c,v 1.428 2008/04/17 19:14:02 drh Exp $
+** $Id: select.c,v 1.429 2008/05/01 17:03:49 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -2938,7 +2938,7 @@
   pAggInfo->directMode = 0;
 }
 
-#ifndef SQLITE_OMIT_TRIGGER
+#if 0
 /*
 ** This function is used when a SELECT statement is used to create a
 ** temporary table for iterating through when running an INSTEAD OF
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 9a53aaa..607e209 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.700 2008/04/28 18:46:43 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.701 2008/05/01 17:03:49 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -2211,10 +2211,10 @@
 #ifdef SQLITE_ENABLE_IOTRACE
 # define IOTRACE(A)  if( sqlite3IoTrace ){ sqlite3IoTrace A; }
   void sqlite3VdbeIOTraceSql(Vdbe*);
+SQLITE_EXTERN void (*sqlite3IoTrace)(const char*,...);
 #else
 # define IOTRACE(A)
 # define sqlite3VdbeIOTraceSql(X)
 #endif
-SQLITE_EXTERN void (*sqlite3IoTrace)(const char*,...);
 
 #endif
diff --git a/src/vdbe.h b/src/vdbe.h
index 5b1a145..eb7dfd0 100644
--- a/src/vdbe.h
+++ b/src/vdbe.h
@@ -15,7 +15,7 @@
 ** or VDBE.  The VDBE implements an abstract machine that runs a
 ** simple program to access and modify the underlying database.
 **
-** $Id: vdbe.h,v 1.130 2008/04/11 14:56:53 drh Exp $
+** $Id: vdbe.h,v 1.131 2008/05/01 17:03:49 drh Exp $
 */
 #ifndef _SQLITE_VDBE_H_
 #define _SQLITE_VDBE_H_
@@ -182,7 +182,9 @@
 void sqlite3VdbeSetSql(Vdbe*, const char *z, int n);
 void sqlite3VdbeSwap(Vdbe*,Vdbe*);
 
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
 int sqlite3VdbeReleaseMemory(int);
+#endif
 UnpackedRecord *sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,void*,int);
 void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord*);
 int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);
diff --git a/src/vdbeInt.h b/src/vdbeInt.h
index 8260d99..b660683 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -421,7 +421,9 @@
 const char *sqlite3OpcodeName(int);
 int sqlite3VdbeOpcodeHasProperty(int, int);
 int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
 int sqlite3VdbeReleaseBuffers(Vdbe *p);
+#endif
 
 #ifndef NDEBUG
   void sqlite3VdbeMemSanity(Mem*);