More annoying and pointless signedness warnings fixed. (CVS 2811)
FossilOrigin-Name: 590578bef88d0aa545f8138e8eec0db03c093861
This commit is contained in:
parent
2646da7e52
commit
03d847eafe
18
manifest
18
manifest
@ -1,5 +1,5 @@
|
||||
C Clean\sup\sannoying\s(and\spointless)\scompiler\swarnings\sabout\sdiffering\ssignedness.\s(CVS\s2810)
|
||||
D 2005-12-09T20:02:05
|
||||
C More\sannoying\sand\spointless\ssignedness\swarnings\sfixed.\s(CVS\s2811)
|
||||
D 2005-12-09T20:21:59
|
||||
F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102
|
||||
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -49,7 +49,7 @@ F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
|
||||
F src/insert.c 5393479164f317ea0aeec954c6500cafa097ef33
|
||||
F src/legacy.c 7b88d20efc8e6c208f262d97aee9c8e2cf02bc91
|
||||
F src/main.c d8656320f9299c70ee6a41deab5350d615ffa3b7
|
||||
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
|
||||
F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
|
||||
F src/os.c bdd3a2fd089777e7ad18b57c896f1141d5a0c1fd
|
||||
F src/os.h d5ae3f4c1c7731437b6cddec279b7c06f761c44e
|
||||
F src/os_common.h d74a11728ad2444b6b695b94c28c06881f049e49
|
||||
@ -72,11 +72,11 @@ F src/sqlite.h.in 8e648e1f386e4509f2f96c09ded7c07b0df0c9a2
|
||||
F src/sqliteInt.h feb11bfe9bf79b4493319173c47739fe2bb7ffa4
|
||||
F src/table.c 486dcfce532685b53b5a2b5da8bba0ded6fb2316
|
||||
F src/tclsqlite.c 328060916c24d328cfab1622c9a0e7ad57c2da8c
|
||||
F src/test1.c 96d78c83c011df65f1c3538e2118647b09239acd
|
||||
F src/test1.c feae6cb2d70a1bc83d7084c590212989922b0f47
|
||||
F src/test2.c 36390cdfc70c08e5ee0b466d0654a117f398bbff
|
||||
F src/test3.c f4e6a16a602091696619a1171bda25c0e3df49f7
|
||||
F src/test3.c 7c97833e33496c2b69f4fe6b9882ac60a481da97
|
||||
F src/test4.c a8fd681e139e1c61f22a77d07fc3a99cb28fff3f
|
||||
F src/test5.c 64f08b2a50ef371a1bd68ff206829e7b1b9997f5
|
||||
F src/test5.c 7162f8526affb771c4ed256826eee7bb9eca265f
|
||||
F src/test6.c cb811391ec0b7c75f29e545d4820a9cf19f3637e
|
||||
F src/tokenize.c 7a3a3d3cc734f684a77c4dfd09eb46fcee25394c
|
||||
F src/trigger.c 2925ba96d964d9b717e74006bf7e64b8a6b70d97
|
||||
@ -327,7 +327,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 3d177bde71811391f79f4ab3bae054ef1bceb6a0
|
||||
R 28591b123245fca85b0cbb70cd4862f2
|
||||
P 83a59151559d9496d4f546e03e65087ea974717d
|
||||
R 2e5f3b3d941bdaa6cfe94522526b1dfc
|
||||
U drh
|
||||
Z 483e3117155553497a07bea2c3be4e78
|
||||
Z d1e3c6a49aee717b43cb6b0d33457f77
|
||||
|
@ -1 +1 @@
|
||||
83a59151559d9496d4f546e03e65087ea974717d
|
||||
590578bef88d0aa545f8138e8eec0db03c093861
|
@ -366,9 +366,9 @@ static void md5step(sqlite3_context *context, int argc, sqlite3_value **argv){
|
||||
MD5Init(p);
|
||||
}
|
||||
for(i=0; i<argc; i++){
|
||||
const char *zData = sqlite3_value_text(argv[i]);
|
||||
const char *zData = (char*)sqlite3_value_text(argv[i]);
|
||||
if( zData ){
|
||||
MD5Update(p, zData, strlen(zData));
|
||||
MD5Update(p, (unsigned char*)zData, strlen(zData));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
28
src/test1.c
28
src/test1.c
@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test1.c,v 1.173 2005/12/09 14:39:04 danielk1977 Exp $
|
||||
** $Id: test1.c,v 1.174 2005/12/09 20:21:59 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@ -373,7 +373,7 @@ static void ifnullFunc(sqlite3_context *context, int argc, sqlite3_value **argv)
|
||||
int i;
|
||||
for(i=0; i<argc; i++){
|
||||
if( SQLITE_NULL!=sqlite3_value_type(argv[i]) ){
|
||||
sqlite3_result_text(context, sqlite3_value_text(argv[i]),
|
||||
sqlite3_result_text(context, (char*)sqlite3_value_text(argv[i]),
|
||||
sqlite3_value_bytes(argv[i]), SQLITE_TRANSIENT);
|
||||
break;
|
||||
}
|
||||
@ -447,7 +447,7 @@ static void sqlite3ExecFunc(
|
||||
struct dstr x;
|
||||
memset(&x, 0, sizeof(x));
|
||||
sqlite3_exec((sqlite3*)sqlite3_user_data(context),
|
||||
sqlite3_value_text(argv[0]),
|
||||
(char*)sqlite3_value_text(argv[0]),
|
||||
execFuncCallback, &x, 0);
|
||||
sqlite3_result_text(context, x.z, x.nUsed, SQLITE_TRANSIENT);
|
||||
sqliteFree(x.z);
|
||||
@ -866,14 +866,14 @@ static int sqlite_abort(
|
||||
*/
|
||||
static void testFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
|
||||
while( argc>=2 ){
|
||||
const char *zArg0 = sqlite3_value_text(argv[0]);
|
||||
const char *zArg0 = (char*)sqlite3_value_text(argv[0]);
|
||||
if( zArg0 ){
|
||||
if( 0==sqlite3StrICmp(zArg0, "int") ){
|
||||
sqlite3_result_int(context, sqlite3_value_int(argv[1]));
|
||||
}else if( sqlite3StrICmp(zArg0,"int64")==0 ){
|
||||
sqlite3_result_int64(context, sqlite3_value_int64(argv[1]));
|
||||
}else if( sqlite3StrICmp(zArg0,"string")==0 ){
|
||||
sqlite3_result_text(context, sqlite3_value_text(argv[1]), -1,
|
||||
sqlite3_result_text(context, (char*)sqlite3_value_text(argv[1]), -1,
|
||||
SQLITE_TRANSIENT);
|
||||
}else if( sqlite3StrICmp(zArg0,"double")==0 ){
|
||||
sqlite3_result_double(context, sqlite3_value_double(argv[1]));
|
||||
@ -1181,10 +1181,12 @@ static int test_collate_func(
|
||||
pVal = sqlite3ValueNew();
|
||||
sqlite3ValueSetStr(pVal, nA, zA, encin, SQLITE_STATIC);
|
||||
n = sqlite3_value_bytes(pVal);
|
||||
Tcl_ListObjAppendElement(i,pX,Tcl_NewStringObj(sqlite3_value_text(pVal),n));
|
||||
Tcl_ListObjAppendElement(i,pX,
|
||||
Tcl_NewStringObj((char*)sqlite3_value_text(pVal),n));
|
||||
sqlite3ValueSetStr(pVal, nB, zB, encin, SQLITE_STATIC);
|
||||
n = sqlite3_value_bytes(pVal);
|
||||
Tcl_ListObjAppendElement(i,pX,Tcl_NewStringObj(sqlite3_value_text(pVal),n));
|
||||
Tcl_ListObjAppendElement(i,pX,
|
||||
Tcl_NewStringObj((char*)sqlite3_value_text(pVal),n));
|
||||
sqlite3ValueFree(pVal);
|
||||
|
||||
Tcl_EvalObjEx(i, pX, 0);
|
||||
@ -1305,7 +1307,7 @@ static void test_function_utf8(
|
||||
Tcl_IncrRefCount(pX);
|
||||
Tcl_ListObjAppendElement(interp, pX, Tcl_NewStringObj("UTF-8", -1));
|
||||
Tcl_ListObjAppendElement(interp, pX,
|
||||
Tcl_NewStringObj(sqlite3_value_text(argv[0]), -1));
|
||||
Tcl_NewStringObj((char*)sqlite3_value_text(argv[0]), -1));
|
||||
Tcl_EvalObjEx(interp, pX, 0);
|
||||
Tcl_DecrRefCount(pX);
|
||||
sqlite3_result_text(pCtx, Tcl_GetStringResult(interp), -1, SQLITE_TRANSIENT);
|
||||
@ -1329,13 +1331,13 @@ static void test_function_utf16le(
|
||||
Tcl_IncrRefCount(pX);
|
||||
Tcl_ListObjAppendElement(interp, pX, Tcl_NewStringObj("UTF-16LE", -1));
|
||||
Tcl_ListObjAppendElement(interp, pX,
|
||||
Tcl_NewStringObj(sqlite3_value_text(argv[0]), -1));
|
||||
Tcl_NewStringObj((char*)sqlite3_value_text(argv[0]), -1));
|
||||
Tcl_EvalObjEx(interp, pX, 0);
|
||||
Tcl_DecrRefCount(pX);
|
||||
pVal = sqlite3ValueNew();
|
||||
sqlite3ValueSetStr(pVal, -1, Tcl_GetStringResult(interp),
|
||||
SQLITE_UTF8, SQLITE_STATIC);
|
||||
sqlite3_result_text(pCtx,sqlite3_value_text(pVal),-1,SQLITE_TRANSIENT);
|
||||
sqlite3_result_text(pCtx,(char*)sqlite3_value_text(pVal),-1,SQLITE_TRANSIENT);
|
||||
sqlite3ValueFree(pVal);
|
||||
}
|
||||
static void test_function_utf16be(
|
||||
@ -1351,7 +1353,7 @@ static void test_function_utf16be(
|
||||
Tcl_IncrRefCount(pX);
|
||||
Tcl_ListObjAppendElement(interp, pX, Tcl_NewStringObj("UTF-16BE", -1));
|
||||
Tcl_ListObjAppendElement(interp, pX,
|
||||
Tcl_NewStringObj(sqlite3_value_text(argv[0]), -1));
|
||||
Tcl_NewStringObj((char*)sqlite3_value_text(argv[0]), -1));
|
||||
Tcl_EvalObjEx(interp, pX, 0);
|
||||
Tcl_DecrRefCount(pX);
|
||||
pVal = sqlite3ValueNew();
|
||||
@ -1667,7 +1669,7 @@ static int test_bind_text16(
|
||||
|
||||
if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR;
|
||||
if( Tcl_GetIntFromObj(interp, objv[2], &idx) ) return TCL_ERROR;
|
||||
value = Tcl_GetByteArrayFromObj(objv[3], 0);
|
||||
value = (char*)Tcl_GetByteArrayFromObj(objv[3], 0);
|
||||
if( Tcl_GetIntFromObj(interp, objv[4], &bytes) ) return TCL_ERROR;
|
||||
|
||||
rc = sqlite3_bind_text16(pStmt, idx, (void *)value, bytes, SQLITE_TRANSIENT);
|
||||
@ -2092,7 +2094,7 @@ static int test_complete16(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
zBuf = Tcl_GetByteArrayFromObj(objv[1], 0);
|
||||
zBuf = (char*)Tcl_GetByteArrayFromObj(objv[1], 0);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_complete16(zBuf)));
|
||||
#endif /* SQLITE_OMIT_COMPLETE && SQLITE_OMIT_UTF16 */
|
||||
return TCL_OK;
|
||||
|
12
src/test3.c
12
src/test3.c
@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test3.c,v 1.62 2005/08/11 02:10:19 drh Exp $
|
||||
** $Id: test3.c,v 1.63 2005/12/09 20:21:59 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "pager.h"
|
||||
@ -972,7 +972,7 @@ static int btree_keysize(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
pCur = sqlite3TextToPtr(argv[1]);
|
||||
sqlite3BtreeKeySize(pCur, &n);
|
||||
sqlite3BtreeKeySize(pCur, (i64*)&n);
|
||||
sqlite3_snprintf(sizeof(zBuf),zBuf, "%llu", n);
|
||||
Tcl_AppendResult(interp, zBuf, 0);
|
||||
return SQLITE_OK;
|
||||
@ -1000,7 +1000,7 @@ static int btree_key(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
pCur = sqlite3TextToPtr(argv[1]);
|
||||
sqlite3BtreeKeySize(pCur, &n);
|
||||
sqlite3BtreeKeySize(pCur, (i64*)&n);
|
||||
if( sqlite3BtreeFlags(pCur) & BTREE_INTKEY ){
|
||||
char zBuf2[60];
|
||||
sqlite3_snprintf(sizeof(zBuf2),zBuf2, "%llu", n);
|
||||
@ -1084,7 +1084,7 @@ static int btree_fetch_key(
|
||||
}
|
||||
pCur = sqlite3TextToPtr(argv[1]);
|
||||
if( Tcl_GetInt(interp, argv[2], &n) ) return TCL_ERROR;
|
||||
sqlite3BtreeKeySize(pCur, &nKey);
|
||||
sqlite3BtreeKeySize(pCur, (i64*)&nKey);
|
||||
zBuf = sqlite3BtreeKeyFetch(pCur, &amt);
|
||||
if( zBuf && amt>=n ){
|
||||
assert( nKey<sizeof(zStatic) );
|
||||
@ -1159,9 +1159,9 @@ static int btree_payload_size(
|
||||
if( sqlite3BtreeFlags(pCur) & BTREE_INTKEY ){
|
||||
n1 = 0;
|
||||
}else{
|
||||
sqlite3BtreeKeySize(pCur, &n1);
|
||||
sqlite3BtreeKeySize(pCur, (i64*)&n1);
|
||||
}
|
||||
sqlite3BtreeDataSize(pCur, &n2);
|
||||
sqlite3BtreeDataSize(pCur, (u32*)&n2);
|
||||
sqlite3_snprintf(sizeof(zBuf),zBuf, "%d", (int)(n1+n2));
|
||||
Tcl_AppendResult(interp, zBuf, 0);
|
||||
return SQLITE_OK;
|
||||
|
10
src/test5.c
10
src/test5.c
@ -15,7 +15,7 @@
|
||||
** is used for testing the SQLite routines for converting between
|
||||
** the various supported unicode encodings.
|
||||
**
|
||||
** $Id: test5.c,v 1.14 2004/11/14 21:56:30 drh Exp $
|
||||
** $Id: test5.c,v 1.15 2005/12/09 20:21:59 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
@ -41,7 +41,7 @@ static int binarize(
|
||||
assert(objc==2);
|
||||
|
||||
bytes = Tcl_GetStringFromObj(objv[1], &len);
|
||||
pRet = Tcl_NewByteArrayObj(bytes, len+1);
|
||||
pRet = Tcl_NewByteArrayObj((u8*)bytes, len+1);
|
||||
Tcl_SetObjResult(interp, pRet);
|
||||
return TCL_OK;
|
||||
}
|
||||
@ -85,7 +85,7 @@ static int test_value_overhead(
|
||||
|
||||
for(i=0; i<repeat_count; i++){
|
||||
if( do_calls ){
|
||||
zVal = sqlite3_value_text(&val);
|
||||
zVal = (char*)sqlite3_value_text(&val);
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ static int test_translate(
|
||||
}
|
||||
sqlite3ValueSetStr(pVal, -1, z, enc_from, xDel);
|
||||
}else{
|
||||
z = Tcl_GetByteArrayFromObj(objv[1], &len);
|
||||
z = (char*)Tcl_GetByteArrayFromObj(objv[1], &len);
|
||||
if( objc==5 ){
|
||||
char *zTmp = z;
|
||||
z = sqliteMalloc(len);
|
||||
@ -170,7 +170,7 @@ static int test_translate(
|
||||
|
||||
z = (char *)sqlite3ValueText(pVal, enc_to);
|
||||
len = sqlite3ValueBytes(pVal, enc_to) + (enc_to==SQLITE_UTF8?1:2);
|
||||
Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(z, len));
|
||||
Tcl_SetObjResult(interp, Tcl_NewByteArrayObj((u8*)z, len));
|
||||
|
||||
sqlite3ValueFree(pVal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user