From: drh Date: Thu, 20 Mar 2014 15:14:08 +0000 (+0000) Subject: Fix harmless compiler warnings. X-Git-Tag: version-3.8.5~116 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ef7efad5eccd9acc32c3ecce05026914beaa903;p=thirdparty%2Fsqlite.git Fix harmless compiler warnings. FossilOrigin-Name: b1435f26b07b2208cfcca557f96342a5bd0d5328 --- diff --git a/manifest b/manifest index 5d2b629021..9590aa3ca2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Previous\scheck-in\sis\snot\squite\scorrect.\s\s"x\sIN\s(?)"\sis\snot\sexactly\sthe\ssame\nas\s"x==?"\sdo\sto\scollation\sand\saffinity\sissues.\s\sThe\scorrect\sconverstion\sshould\nbe\sto\s"x==(+?\sCOLLATE\sbinary)".\s\sThe\scurrent\scheck-in\sfixes\sthis\sproblem\sand\nprovides\stest\scases.\s\sTicket\s[e39d032577df69] -D 2014-03-20T14:56:47.071 +C Fix\sharmless\scompiler\swarnings. +D 2014-03-20T15:14:08.664 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -173,7 +173,7 @@ F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac F src/ctime.c 0231df905e2c4abba4483ee18ffc05adc321df2a F src/date.c 593c744b2623971e45affd0bde347631bdfa4625 F src/delete.c cdd57149543bb28304d8f717c243f2a86b1fc280 -F src/expr.c 014b8087a15c4c314bdd798cb1cb0b32693f8b40 +F src/expr.c b74939e7935c4ad9e7f87b31ce05713fd5dafc3a F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c 5269ef07b100763134f71b889327c333bd0989cf F src/func.c 2945bb2c4cdc0ac43733046285a4434310be1811 @@ -207,7 +207,7 @@ F src/os_unix.c 18f7f95dc6bcb9cf4d4a238d8e2de96611bc2ae5 F src/os_win.c e71678ac927d0a0fb11d993db20a9748eabf808e F src/pager.c 97a8908bf4e6e7c3adea09d3597cfa48ae33ab4e F src/pager.h ffd5607f7b3e4590b415b007a4382f693334d428 -F src/parse.y c9189eca0888ecd2711c77a199ae7a7c86f57546 +F src/parse.y d21075457487f84a72f848c2545e3319d6452e6f F src/pcache.c d8eafac28290d4bb80332005435db44991d07fc2 F src/pcache.h a5e4f5d9f5d592051d91212c5949517971ae6222 F src/pcache1.c 102e6f5a2fbc646154463eb856d1fd716867b64c @@ -222,7 +222,7 @@ F src/shell.c bab4de12b441369491812ecc93212ff4deda68fa F src/sqlite.h.in a2ef671f92747a5a1c8a47bad5c585a8dd9eca80 F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc -F src/sqliteInt.h fa7161b3de18a9c355d4148233f3563c92311fcc +F src/sqliteInt.h db6d7cf6e44d1c862f4f5290716098a0b90f1310 F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d F src/status.c 7ac05a5c7017d0b9f0b4bcd701228b784f987158 F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e @@ -285,7 +285,7 @@ F src/vdbeapi.c 0ed6053f947edd0b30f64ce5aeb811872a3450a4 F src/vdbeaux.c e45e3f9daf38c5be3fd39e9aacc1c9066af57a06 F src/vdbeblob.c 15377abfb59251bccedd5a9c7d014a895f0c04aa F src/vdbemem.c 6fc77594c60f6155404f3f8d71bf36d1fdeb4447 -F src/vdbesort.c 0a9e5e63d7ce196651610d1a264eeb0b2152d3ba +F src/vdbesort.c 0fef5fa890fda760f92f293a5b0f2ccfe5d2dc55 F src/vdbetrace.c 6f52bc0c51e144b7efdcfb2a8f771167a8816767 F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd F src/wal.c 76e7fc6de229bea8b30bb2539110f03a494dc3a8 @@ -1156,7 +1156,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff -P e68b427afbc82e201c64474117851aa4c9eb0c92 -R 8739dc742c6ff38e89fff08724b87c5b +P 2ff3b25f40fd117c8a2da1d1a3625f6b167b7b16 +R b4897cbb8b99db805aa2642c2b5c6a8f U drh -Z c6097cc93dfeb105af183d7216a869ad +Z 8f62a0caca3ff37dd6879b77616b6faf diff --git a/manifest.uuid b/manifest.uuid index 7bb62d8aab..82d7da5708 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2ff3b25f40fd117c8a2da1d1a3625f6b167b7b16 \ No newline at end of file +b1435f26b07b2208cfcca557f96342a5bd0d5328 \ No newline at end of file diff --git a/src/expr.c b/src/expr.c index 722a77db73..83b948e8e1 100644 --- a/src/expr.c +++ b/src/expr.c @@ -65,7 +65,11 @@ char sqlite3ExprAffinity(Expr *pExpr){ ** If a memory allocation error occurs, that fact is recorded in pParse->db ** and the pExpr parameter is returned unchanged. */ -Expr *sqlite3ExprAddCollateToken(Parse *pParse, Expr *pExpr, Token *pCollName){ +Expr *sqlite3ExprAddCollateToken( + Parse *pParse, /* Parsing context */ + Expr *pExpr, /* Add the "COLLATE" clause to this expression */ + const Token *pCollName /* Name of collating sequence */ +){ if( pCollName->n>0 ){ Expr *pNew = sqlite3ExprAlloc(pParse->db, TK_COLLATE, pCollName, 1); if( pNew ){ diff --git a/src/parse.y b/src/parse.y index 24b8b98afc..aae30f5ee2 100644 --- a/src/parse.y +++ b/src/parse.y @@ -1031,8 +1031,7 @@ expr(A) ::= expr(W) between_op(N) expr(X) AND expr(Y). [BETWEEN] { ** expr1 == (+?1 COLLATE binary) ** expr1 <> (+?2 COLLATE binary) */ - static const Token collBin = { "binary", 6 }; - Expr *pRHS = sqlite3ExprAddCollateToken(pParse, Y->a[0].pExpr, &collBin); + Expr *pRHS = sqlite3ExprAddCollateString(pParse, Y->a[0].pExpr, "binary"); Y->a[0].pExpr = 0; sqlite3ExprListDelete(pParse->db, Y); pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0, 0); diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 3ee39e5278..0974db7c91 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3291,7 +3291,7 @@ int sqlite3ReadSchema(Parse *pParse); CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int); CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName); CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr); -Expr *sqlite3ExprAddCollateToken(Parse *pParse, Expr*, Token*); +Expr *sqlite3ExprAddCollateToken(Parse *pParse, Expr*, const Token*); Expr *sqlite3ExprAddCollateString(Parse*,Expr*,const char*); Expr *sqlite3ExprSkipCollate(Expr*); int sqlite3CheckCollSeq(Parse *, CollSeq *); diff --git a/src/vdbesort.c b/src/vdbesort.c index f971c2d933..839782b9c7 100644 --- a/src/vdbesort.c +++ b/src/vdbesort.c @@ -993,12 +993,12 @@ int sqlite3VdbeSorterNext(sqlite3 *db, const VdbeCursor *pCsr, int *pbEof){ ** a value equivalent to pIter2. So set pKey2 to NULL to prevent ** vdbeSorterCompare() from decoding pIter2 again. */ if( iRes<=0 ){ - pSorter->aTree[i] = (pIter1 - pSorter->aIter); + pSorter->aTree[i] = (int)(pIter1 - pSorter->aIter); pIter2 = &pSorter->aIter[ pSorter->aTree[i ^ 0x0001] ]; pKey2 = pIter2->aKey; }else{ if( pIter1->pFile ) pKey2 = 0; - pSorter->aTree[i] = (pIter2 - pSorter->aIter); + pSorter->aTree[i] = (int)(pIter2 - pSorter->aIter); pIter1 = &pSorter->aIter[ pSorter->aTree[i ^ 0x0001] ]; }