aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-05-01 17:03:49 +0000
committerdrh <drh@noemail.net>2008-05-01 17:03:49 +0000
commite265b08458046aacf966a79525acf955d33072cb (patch)
tree5255d5d2f542d1159bc9c190aa26f0c6b7be6bf8 /src
parent356574e97aad6cbed1221aa02ddd0f33c8a6c01e (diff)
downloadsqlite-e265b08458046aacf966a79525acf955d33072cb.tar.gz
sqlite-e265b08458046aacf966a79525acf955d33072cb.zip
Fix harmless compiler warnings. (CVS 5073)
FossilOrigin-Name: 227a6f67c21c87a7cf98f84b9d57a6dc9da93ebb
Diffstat (limited to 'src')
-rw-r--r--src/loadext.c6
-rw-r--r--src/main.c4
-rw-r--r--src/pager.c25
-rw-r--r--src/pager.h3
-rw-r--r--src/select.c4
-rw-r--r--src/sqliteInt.h4
-rw-r--r--src/vdbe.h4
-rw-r--r--src/vdbeInt.h2
8 files changed, 20 insertions, 32 deletions
diff --git a/src/loadext.c b/src/loadext.c
index d42bc4e03..8f1a864ea 100644
--- a/src/loadext.c
+++ b/src/loadext.c
@@ -469,7 +469,9 @@ static struct {
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 @@ int sqlite3_auto_extension(void *xInit){
** 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 @@ int sqlite3AutoLoadExtensions(sqlite3 *db){
}
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 25c794768..2ed200b06 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 @@ const char *sqlite3_libversion(void){ return sqlite3_version; }
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 @@ int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
** 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 83593d18b..89d6140e6 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 @@ int sqlite3PagerIswriteable(DbPage *pPg){
}
#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 9b65960c3..da61cc142 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 @@ DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
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 4c9a01ea8..b8eb6f92d 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 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
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 9a53aaaa5..607e2094d 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 @@ void sqlite3Put4byte(u8*, u32);
#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 5b1a14591..eb7dfd01b 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 @@ sqlite3 *sqlite3VdbeDb(Vdbe*);
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 8260d999f..b660683da 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -421,7 +421,9 @@ int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
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*);