1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix compiler warnings in the TCL test harness.

FossilOrigin-Name: c4cd38a0c71e2887e47bebb9d10baf30802a7f13
This commit is contained in:
drh
2012-01-30 18:00:31 +00:00
parent d794e8b026
commit caffb1a532
6 changed files with 24 additions and 32 deletions

View File

@@ -713,14 +713,14 @@ static int test_memdebug_settitle(
int objc,
Tcl_Obj *CONST objv[]
){
const char *zTitle;
if( objc!=2 ){
Tcl_WrongNumArgs(interp, 1, objv, "TITLE");
return TCL_ERROR;
}
zTitle = Tcl_GetString(objv[1]);
#ifdef SQLITE_MEMDEBUG
{
const char *zTitle;
zTitle = Tcl_GetString(objv[1]);
extern int sqlite3MemdebugSettitle(const char*);
sqlite3MemdebugSettitle(zTitle);
}
@@ -1033,7 +1033,6 @@ static int test_config_lookaside(
int objc,
Tcl_Obj *CONST objv[]
){
int rc;
int sz, cnt;
Tcl_Obj *pRet;
if( objc!=3 ){
@@ -1049,7 +1048,7 @@ static int test_config_lookaside(
Tcl_ListObjAppendElement(
interp, pRet, Tcl_NewIntObj(sqlite3GlobalConfig.nLookaside)
);
rc = sqlite3_config(SQLITE_CONFIG_LOOKASIDE, sz, cnt);
sqlite3_config(SQLITE_CONFIG_LOOKASIDE, sz, cnt);
Tcl_SetObjResult(interp, pRet);
return TCL_OK;
}
@@ -1106,7 +1105,6 @@ static int test_config_heap(
Tcl_Obj *CONST objv[]
){
static char *zBuf; /* Use this memory */
static int szBuf; /* Bytes allocated for zBuf */
int nByte; /* Size of buffer to pass to sqlite3_config() */
int nMinAlloc; /* Size of minimum allocation */
int rc; /* Return code of sqlite3_config() */
@@ -1124,11 +1122,9 @@ static int test_config_heap(
if( nByte==0 ){
free( zBuf );
zBuf = 0;
szBuf = 0;
rc = sqlite3_config(SQLITE_CONFIG_HEAP, (void*)0, 0, 0);
}else{
zBuf = realloc(zBuf, nByte);
szBuf = nByte;
rc = sqlite3_config(SQLITE_CONFIG_HEAP, zBuf, nByte, nMinAlloc);
}