mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Fixes for harmless compiler warnings.
FossilOrigin-Name: c28c973ad6debd63f13e5d4d3da036f680baaec9d863eda039f2747db9f1cfd5
This commit is contained in:
@ -1000,8 +1000,8 @@ static int fts3MatchinfoCheck(
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
|
||||
static int fts3MatchinfoSize(MatchInfo *pInfo, char cArg){
|
||||
int nVal; /* Number of integers output by cArg */
|
||||
static size_t fts3MatchinfoSize(MatchInfo *pInfo, char cArg){
|
||||
size_t nVal; /* Number of integers output by cArg */
|
||||
|
||||
switch( cArg ){
|
||||
case FTS3_MATCHINFO_NDOC:
|
||||
@ -1285,7 +1285,7 @@ static int fts3MatchinfoValues(
|
||||
|
||||
case FTS3_MATCHINFO_LHITS_BM:
|
||||
case FTS3_MATCHINFO_LHITS: {
|
||||
int nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
|
||||
size_t nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
|
||||
memset(pInfo->aMatchinfo, 0, nZero);
|
||||
rc = fts3ExprLHitGather(pCsr->pExpr, pInfo);
|
||||
break;
|
||||
|
@ -3691,7 +3691,7 @@ static int fts5WriteDlidxGrow(
|
||||
if( aDlidx==0 ){
|
||||
p->rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
int nByte = sizeof(Fts5DlidxWriter) * (nLvl - pWriter->nDlidx);
|
||||
size_t nByte = sizeof(Fts5DlidxWriter) * (nLvl - pWriter->nDlidx);
|
||||
memset(&aDlidx[pWriter->nDlidx], 0, nByte);
|
||||
pWriter->aDlidx = aDlidx;
|
||||
pWriter->nDlidx = nLvl;
|
||||
|
@ -2468,14 +2468,14 @@ static int fts5CreateAux(
|
||||
int rc = sqlite3_overload_function(pGlobal->db, zName, -1);
|
||||
if( rc==SQLITE_OK ){
|
||||
Fts5Auxiliary *pAux;
|
||||
int nName; /* Size of zName in bytes, including \0 */
|
||||
int nByte; /* Bytes of space to allocate */
|
||||
sqlite3_int64 nName; /* Size of zName in bytes, including \0 */
|
||||
sqlite3_int64 nByte; /* Bytes of space to allocate */
|
||||
|
||||
nName = (int)strlen(zName) + 1;
|
||||
nName = strlen(zName) + 1;
|
||||
nByte = sizeof(Fts5Auxiliary) + nName;
|
||||
pAux = (Fts5Auxiliary*)sqlite3_malloc(nByte);
|
||||
pAux = (Fts5Auxiliary*)sqlite3_malloc64(nByte);
|
||||
if( pAux ){
|
||||
memset(pAux, 0, nByte);
|
||||
memset(pAux, 0, (size_t)nByte);
|
||||
pAux->zFunc = (char*)&pAux[1];
|
||||
memcpy(pAux->zFunc, zName, nName);
|
||||
pAux->pGlobal = pGlobal;
|
||||
@ -2505,15 +2505,15 @@ static int fts5CreateTokenizer(
|
||||
){
|
||||
Fts5Global *pGlobal = (Fts5Global*)pApi;
|
||||
Fts5TokenizerModule *pNew;
|
||||
int nName; /* Size of zName and its \0 terminator */
|
||||
int nByte; /* Bytes of space to allocate */
|
||||
sqlite3_int64 nName; /* Size of zName and its \0 terminator */
|
||||
sqlite3_int64 nByte; /* Bytes of space to allocate */
|
||||
int rc = SQLITE_OK;
|
||||
|
||||
nName = (int)strlen(zName) + 1;
|
||||
nName = strlen(zName) + 1;
|
||||
nByte = sizeof(Fts5TokenizerModule) + nName;
|
||||
pNew = (Fts5TokenizerModule*)sqlite3_malloc(nByte);
|
||||
pNew = (Fts5TokenizerModule*)sqlite3_malloc64(nByte);
|
||||
if( pNew ){
|
||||
memset(pNew, 0, nByte);
|
||||
memset(pNew, 0, (size_t)nByte);
|
||||
pNew->zName = (char*)&pNew[1];
|
||||
memcpy(pNew->zName, zName, nName);
|
||||
pNew->pUserData = pUserData;
|
||||
|
@ -1040,7 +1040,7 @@ static int rbuMPrintfExec(sqlite3rbu *p, sqlite3 *db, const char *zFmt, ...){
|
||||
** immediately without attempting the allocation or modifying the stored
|
||||
** error code.
|
||||
*/
|
||||
static void *rbuMalloc(sqlite3rbu *p, int nByte){
|
||||
static void *rbuMalloc(sqlite3rbu *p, sqlite3_int64 nByte){
|
||||
void *pRet = 0;
|
||||
if( p->rc==SQLITE_OK ){
|
||||
assert( nByte>0 );
|
||||
@ -1061,7 +1061,7 @@ static void *rbuMalloc(sqlite3rbu *p, int nByte){
|
||||
** error code in the RBU handle passed as the first argument.
|
||||
*/
|
||||
static void rbuAllocateIterArrays(sqlite3rbu *p, RbuObjIter *pIter, int nCol){
|
||||
int nByte = (2*sizeof(char*) + sizeof(int) + 3*sizeof(u8)) * nCol;
|
||||
sqlite3_int64 nByte = (2*sizeof(char*) + sizeof(int) + 3*sizeof(u8)) * nCol;
|
||||
char **azNew;
|
||||
|
||||
azNew = (char**)rbuMalloc(p, nByte);
|
||||
@ -1705,7 +1705,7 @@ static char *rbuObjIterGetSetlist(
|
||||
*/
|
||||
static char *rbuObjIterGetBindlist(sqlite3rbu *p, int nBind){
|
||||
char *zRet = 0;
|
||||
int nByte = nBind*2 + 1;
|
||||
sqlite3_int64 nByte = 2*(sqlite3_int64)nBind + 1;
|
||||
|
||||
zRet = (char*)rbuMalloc(p, nByte);
|
||||
if( zRet ){
|
||||
@ -4561,7 +4561,7 @@ static int rbuVfsShmMap(
|
||||
assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
|
||||
if( eStage==RBU_STAGE_OAL || eStage==RBU_STAGE_MOVE ){
|
||||
if( iRegion<=p->nShm ){
|
||||
int nByte = (iRegion+1) * sizeof(char*);
|
||||
sqlite3_int64 nByte = (iRegion+1) * sizeof(char*);
|
||||
char **apNew = (char**)sqlite3_realloc64(p->apShm, nByte);
|
||||
if( apNew==0 ){
|
||||
rc = SQLITE_NOMEM;
|
||||
|
@ -902,7 +902,7 @@ static int sessionGrowHash(int bPatchset, SessionTable *pTab){
|
||||
if( pTab->nChange==0 || pTab->nEntry>=(pTab->nChange/2) ){
|
||||
int i;
|
||||
SessionChange **apNew;
|
||||
int nNew = (pTab->nChange ? pTab->nChange : 128) * 2;
|
||||
sqlite3_int64 nNew = 2*(sqlite3_int64)(pTab->nChange ? pTab->nChange : 128);
|
||||
|
||||
apNew = (SessionChange **)sqlite3_malloc64(sizeof(SessionChange *) * nNew);
|
||||
if( apNew==0 ){
|
||||
@ -1829,7 +1829,7 @@ int sqlite3session_attach(
|
||||
** If successful, return zero. Otherwise, if an OOM condition is encountered,
|
||||
** set *pRc to SQLITE_NOMEM and return non-zero.
|
||||
*/
|
||||
static int sessionBufferGrow(SessionBuffer *p, int nByte, int *pRc){
|
||||
static int sessionBufferGrow(SessionBuffer *p, size_t nByte, int *pRc){
|
||||
if( *pRc==SQLITE_OK && p->nAlloc-p->nBuf<nByte ){
|
||||
u8 *aNew;
|
||||
i64 nNew = p->nAlloc ? p->nAlloc : 128;
|
||||
@ -2947,7 +2947,7 @@ static int sessionChangesetReadTblhdr(sqlite3_changeset_iter *p){
|
||||
}
|
||||
|
||||
if( rc==SQLITE_OK ){
|
||||
int iPK = sizeof(sqlite3_value*)*p->nCol*2;
|
||||
size_t iPK = sizeof(sqlite3_value*)*p->nCol*2;
|
||||
memset(p->tblhdr.aBuf, 0, iPK);
|
||||
memcpy(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy);
|
||||
p->in.iNext += nCopy;
|
||||
@ -4251,7 +4251,7 @@ static int sessionRetryConstraints(
|
||||
|
||||
rc = sessionChangesetStart(&pIter2, 0, 0, cons.nBuf, cons.aBuf, 0);
|
||||
if( rc==SQLITE_OK ){
|
||||
int nByte = 2*pApply->nCol*sizeof(sqlite3_value*);
|
||||
size_t nByte = 2*pApply->nCol*sizeof(sqlite3_value*);
|
||||
int rc2;
|
||||
pIter2->bPatchset = bPatchset;
|
||||
pIter2->zTab = (char*)zTab;
|
||||
|
30
manifest
30
manifest
@ -1,5 +1,5 @@
|
||||
C Use\sthe\s64-bit\smemory\sallocator\sinterfaces\sin\sextensions,\swhenever\spossible.
|
||||
D 2019-04-13T04:38:32.376
|
||||
C Fixes\sfor\sharmless\scompiler\swarnings.
|
||||
D 2019-04-13T14:07:57.472
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -90,7 +90,7 @@ F ext/fts3/fts3_hash.c 8b6e31bfb0844c27dc6092c2620bdb1fca17ed613072db057d96952c6
|
||||
F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf
|
||||
F ext/fts3/fts3_icu.c 305ce7fb6036484085b5556a9c8e62acdc7763f0f4cdf5fd538212a9f3720116
|
||||
F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009
|
||||
F ext/fts3/fts3_snippet.c 7d3c7076957f3f18bcd64998a5baa3f7296cb7f909b3a96e972618a6a1d9c4a8
|
||||
F ext/fts3/fts3_snippet.c 09b38ba5bfe5667aacddcb88b047fe0f7218efeb3fc8dee0e4eb6ebd170318b9
|
||||
F ext/fts3/fts3_term.c f45a1e7c6ef464abb1231245d123dae12266b69e05cc56e14045b76591ae92d1
|
||||
F ext/fts3/fts3_test.c 5f65679c195e53701d9e21d3dc73b0c09f146ae4ad86ae802d0ddaf62b29f9cd
|
||||
F ext/fts3/fts3_tokenize_vtab.c 1de9a61acfa2a0445ed989310c31839c57f6b6086dd9d5c97177ae734a17fd8b
|
||||
@ -116,8 +116,8 @@ F ext/fts5/fts5_buffer.c 7d91caa0d862079d787660ec405d2fda6fd4f206d95b870dc7adc3b
|
||||
F ext/fts5/fts5_config.c d7523cba5e66da077233c023aecbc3e6a37978ff75a18131c5ab5b1229d5bac7
|
||||
F ext/fts5/fts5_expr.c 840c88d55e78083a5e61a35968df877712ae28791b347eced1e98e3b337d2d3c
|
||||
F ext/fts5/fts5_hash.c 1cc0095646f5f3b46721aa112fb4f9bf29ae175cb5338f89dcec66ed97acfe75
|
||||
F ext/fts5/fts5_index.c 8a3ef6f2dcf2a4c4212d0a6ad5ecc5f2d2912a5a5f6ced3a6ae0d5993ecce0f4
|
||||
F ext/fts5/fts5_main.c de317d9890e9bb61e1d295a00b53d0a0b2d0ef08789108566bf530e6a1d06887
|
||||
F ext/fts5/fts5_index.c 9146da94d0b9f62217c6ad234342fda3fbac3c254455d0b3f53957ad85262e08
|
||||
F ext/fts5/fts5_main.c abd04720e2729ba5bab2648d9d541faab18f45d481ae21fc30f125b55e979d6b
|
||||
F ext/fts5/fts5_storage.c b24f6916fcdd68989a549f25962f286bdba9d9d59c7581567a6a0eb647cd07cc
|
||||
F ext/fts5/fts5_tcl.c 39bcbae507f594aad778172fa914cad0f585bf92fd3b078c686e249282db0d95
|
||||
F ext/fts5/fts5_test_mi.c 08c11ec968148d4cb4119d96d819f8c1f329812c568bac3684f5464be177d3ee
|
||||
@ -358,7 +358,7 @@ F ext/rbu/rbutemplimit.test 7f408f49b90fa0a720d7599f3aec74a3c85e6cd78e56fdf726ce
|
||||
F ext/rbu/rbuvacuum.test 55e101e90168c2b31df6c9638fe73dc7f7cc666b6142266d1563697d79f73534
|
||||
F ext/rbu/rbuvacuum2.test b8e5b51dc8b2c0153373d024c0936be3f66f9234acbd6d0baab0869d56b14e6b
|
||||
F ext/rbu/rbuvacuum3.test 8addd82e4b83b4c93fa47428eae4fd0dbf410f8512c186f38e348feb49ba03dc
|
||||
F ext/rbu/sqlite3rbu.c 3f21eda2ee997ac2db4b351d6ed87b723056a4ce5484e06f0be6671ed602cf3e
|
||||
F ext/rbu/sqlite3rbu.c f222350c33f063cbc754001cd4e9683164c6cb06be76ae43f15b396ec6fc1993
|
||||
F ext/rbu/sqlite3rbu.h 1dc88ab7bd32d0f15890ea08d23476c4198d3da3056985403991f8c9cd389812
|
||||
F ext/rbu/test_rbu.c 03f6f177096a5f822d68d8e4069ad8907fe572c62ff2d19b141f59742821828a
|
||||
F ext/repair/README.md 92f5e8aae749a4dae14f02eea8e1bb42d4db2b6ce5e83dbcdd6b1446997e0c15
|
||||
@ -431,7 +431,7 @@ F ext/session/sessioninvert.test ae1a003a9ab1f8d64227dbb5c3a4c97e65b561b01e7b295
|
||||
F ext/session/sessionrebase.test ccfa716b23bd1d3b03217ee58cfd90c78d4b99f53e6a9a2f05e82363b9142810
|
||||
F ext/session/sessionstat1.test 218d351cf9fcd6648f125a26b607b140310160184723c2666091b54450a68fb5
|
||||
F ext/session/sessionwor.test 67b5ab91d4f93ce65ff1f58240ac5ddf73f8670facc1ffa49cef56293d52818d
|
||||
F ext/session/sqlite3session.c faf074fedbb3d17d82b1321575b5412e234746a2d5bd2244bc85484786ab686d
|
||||
F ext/session/sqlite3session.c 12c958dcd093fca229ca3d3fd833f2f99f1d9c70093dca60f697d5f8e20ebde1
|
||||
F ext/session/sqlite3session.h 919be6649d39d6413ce7a63fc3e3bca3270e18bc2d57ad4040a70007b9e54397
|
||||
F ext/session/test_session.c 98797aba475a799376c9a42214f2d1debf2d0c3cb657d9c8bbf4f70bf3fb4aec
|
||||
F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
|
||||
@ -462,7 +462,7 @@ F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c 958939f608e351a36756e3749596472baa0e5aae54eebd14e6beffe7a68aafc7
|
||||
F src/btree.h c11446f07ec0e9dc85af8041cb0855c52f5359c8b2a43e47e02a685282504d89
|
||||
F src/btreeInt.h 6111c15868b90669f79081039d19e7ea8674013f907710baa3c814dc3f8bfd3f
|
||||
F src/build.c 55a1fce8a223961f7749e4f858c77e488d3509855f252b9f2dd17489c0555528
|
||||
F src/build.c 61655dad911a967a69fb49df57268fd15ce8f1af3fe0a1bd90c128ef2cacfb7a
|
||||
F src/callback.c 25dda5e1c2334a367b94a64077b1d06b2553369f616261ca6783c48bcb6bda73
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c 109e58d00f62e8e71ee1eb5944ac18b90171c928ab2e082e058056e1137cc20b
|
||||
@ -475,8 +475,8 @@ F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||
F src/fkey.c bd0138acdc008c1845ccf92f8e73787880562de649471804801c06fed814c765
|
||||
F src/func.c 2ccf4ae12430b1ae7096be5f0675887e1bd0732828af0ac0f7496339b7c6edee
|
||||
F src/global.c 0dea3065ea72a65ae941559b6686aad6516d4913e76fa4f79a95ff7787f624ec
|
||||
F src/hash.c a12580e143f10301ed5166ea4964ae2853d3905a511d4e0c44497245c7ce1f7a
|
||||
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
||||
F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
|
||||
F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
|
||||
F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
|
||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c fc3cf5c371f9a400144e8c2f148ab29cd3f67f7da7eaf47e6a6959f8255fd92c
|
||||
@ -594,14 +594,14 @@ F src/vdbe.c 711ef421b3bb3db3b2476067b2dc3c71ef5844d9b1a723026578f89f6da621e8
|
||||
F src/vdbe.h 712bca562eaed1c25506b9faf9680bdc75fc42e2f4a1cd518d883fa79c7a4237
|
||||
F src/vdbeInt.h 2c12704db9740c8e899786ecfc7a5797a9d067563496eb1b6ed03c592d7b8d90
|
||||
F src/vdbeapi.c a6e462bd7853e272cf614d6fbda7f3f20c89a2d255805855b32895a5983ddcec
|
||||
F src/vdbeaux.c 2b16b6735b99189e043378e90216e03522ddd02ecf2fc7aca779bd0553702984
|
||||
F src/vdbeaux.c f873b5c2efcf8a4d6ecfc5b1a5b06fd810419198f3bd882175d371cc03801873
|
||||
F src/vdbeblob.c f5c70f973ea3a9e915d1693278a5f890dc78594300cf4d54e64f2b0917c94191
|
||||
F src/vdbemem.c 8e6889761e344babdb8a56dd1ac8911501fa648396544d1644f1cd6a87c80dc0
|
||||
F src/vdbesort.c 31c7794a517e8b0a1704988f1f7596b74c6fc07eeb7bb85776f50a391ed9d94f
|
||||
F src/vdbetrace.c 79d6dbbc479267b255a7de8080eee6e729928a0ef93ed9b0bfa5618875b48392
|
||||
F src/vtab.c 4c5959e00b7a142198d178e3a822f4e05f36f2d1a3c57657373f9487154fc06b
|
||||
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c 8bf87820896453ee3cca75f3082c57d7d82643e46cc089775612b18453732c12
|
||||
F src/wal.c 9eccc7ebb532a7b0fd3cabc16cff576b9afa763472272db67d84fb8cec96f5c0
|
||||
F src/wal.h 606292549f5a7be50b6227bd685fa76e3a4affad71bb8ac5ce4cb5c79f6a176a
|
||||
F src/walker.c 7607f1a68130c028255d8d56094ea602fc402c79e1e35a46e6282849d90d5fe4
|
||||
F src/where.c ff2955dc2743c1af05ba5a8232ab72724d9a63b76dbee256368f40fd3ef82db5
|
||||
@ -1818,7 +1818,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 0b6ae032c28e7fe34d81d1769f6e2901addbd1b95cd9a255dcef274061fb0164
|
||||
R f65e35fb7d023d9679dfd6f5ac3c1078
|
||||
P 07ee06fd390bfebebc014b47583d489747b0423bb96c810bed5c605ce0e3be71
|
||||
R b2ecaf35e009c36922e149aaa8d2b2c6
|
||||
U drh
|
||||
Z d5f121565d037d8ea5f3ddfdf63062a1
|
||||
Z 2c133b00e5aeb137166a48df07d40217
|
||||
|
@ -1 +1 @@
|
||||
07ee06fd390bfebebc014b47583d489747b0423bb96c810bed5c605ce0e3be71
|
||||
c28c973ad6debd63f13e5d4d3da036f680baaec9d863eda039f2747db9f1cfd5
|
@ -3768,7 +3768,7 @@ void *sqlite3ArrayAllocate(
|
||||
int *pIdx /* Write the index of a new slot here */
|
||||
){
|
||||
char *z;
|
||||
sqlite3_int64 n = *pnEntry;
|
||||
sqlite3_int64 n = *pIdx = *pnEntry;
|
||||
if( (n & (n-1))==0 ){
|
||||
sqlite3_int64 sz = (n==0) ? 1 : 2*n;
|
||||
void *pNew = sqlite3DbRealloc(db, pArray, sz*szEntry);
|
||||
@ -3780,7 +3780,6 @@ void *sqlite3ArrayAllocate(
|
||||
}
|
||||
z = (char*)pArray;
|
||||
memset(&z[n * szEntry], 0, szEntry);
|
||||
*pIdx = n;
|
||||
++*pnEntry;
|
||||
return pArray;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ static HashElem *findElementWithHash(
|
||||
unsigned int *pHash /* Write the hash value here */
|
||||
){
|
||||
HashElem *elem; /* Used to loop thru the element list */
|
||||
int count; /* Number of elements left to test */
|
||||
unsigned int count; /* Number of elements left to test */
|
||||
unsigned int h; /* The computed hash */
|
||||
static HashElem nullElement = { 0, 0, 0, 0 };
|
||||
|
||||
@ -198,8 +198,8 @@ static void removeElementGivenHash(
|
||||
if( pEntry->chain==elem ){
|
||||
pEntry->chain = elem->next;
|
||||
}
|
||||
assert( pEntry->count>0 );
|
||||
pEntry->count--;
|
||||
assert( pEntry->count>=0 );
|
||||
}
|
||||
sqlite3_free( elem );
|
||||
pH->count--;
|
||||
|
@ -45,7 +45,7 @@ struct Hash {
|
||||
unsigned int count; /* Number of entries in this table */
|
||||
HashElem *first; /* The first element of the array */
|
||||
struct _ht { /* the hash table */
|
||||
int count; /* Number of entries with this hash */
|
||||
unsigned int count; /* Number of entries with this hash */
|
||||
HashElem *chain; /* Pointer to first entry with this hash */
|
||||
} *ht;
|
||||
};
|
||||
|
@ -159,7 +159,7 @@ static int growOpArray(Vdbe *v, int nOp){
|
||||
: (sqlite3_int64)v->nOpAlloc+nOp);
|
||||
#else
|
||||
sqlite3_int64 nNew = (v->nOpAlloc ? 2*(sqlite3_int64)v->nOpAlloc
|
||||
: (sqlite3_int64)1024/sizeof(Op));
|
||||
: (sqlite3_int64)(1024/sizeof(Op)));
|
||||
UNUSED_PARAMETER(nOp);
|
||||
#endif
|
||||
|
||||
@ -2068,9 +2068,9 @@ void sqlite3VdbeIOTraceSql(Vdbe *p){
|
||||
** of a ReusableSpace object by the allocSpace() routine below.
|
||||
*/
|
||||
struct ReusableSpace {
|
||||
u8 *pSpace; /* Available memory */
|
||||
int nFree; /* Bytes of available memory */
|
||||
int nNeeded; /* Total bytes that could not be allocated */
|
||||
u8 *pSpace; /* Available memory */
|
||||
sqlite3_int64 nFree; /* Bytes of available memory */
|
||||
sqlite3_int64 nNeeded; /* Total bytes that could not be allocated */
|
||||
};
|
||||
|
||||
/* Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf
|
||||
@ -2090,7 +2090,7 @@ struct ReusableSpace {
|
||||
static void *allocSpace(
|
||||
struct ReusableSpace *p, /* Bulk memory available for allocation */
|
||||
void *pBuf, /* Pointer to a prior allocation */
|
||||
int nByte /* Bytes of memory needed */
|
||||
sqlite3_int64 nByte /* Bytes of memory needed */
|
||||
){
|
||||
assert( EIGHT_BYTE_ALIGNMENT(p->pSpace) );
|
||||
if( pBuf==0 ){
|
||||
|
@ -575,7 +575,7 @@ static SQLITE_NOINLINE int walIndexPageRealloc(
|
||||
|
||||
/* Enlarge the pWal->apWiData[] array if required */
|
||||
if( pWal->nWiData<=iPage ){
|
||||
int nByte = sizeof(u32*)*(iPage+1);
|
||||
sqlite3_int64 nByte = sizeof(u32*)*(iPage+1);
|
||||
volatile u32 **apNew;
|
||||
apNew = (volatile u32 **)sqlite3_realloc64((void *)pWal->apWiData, nByte);
|
||||
if( !apNew ){
|
||||
@ -679,6 +679,7 @@ static void walChecksumBytes(
|
||||
|
||||
assert( nByte>=8 );
|
||||
assert( (nByte&0x00000007)==0 );
|
||||
assert( nByte<=65536 );
|
||||
|
||||
if( nativeCksum ){
|
||||
do {
|
||||
@ -1616,7 +1617,7 @@ static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){
|
||||
WalIterator *p; /* Return value */
|
||||
int nSegment; /* Number of segments to merge */
|
||||
u32 iLast; /* Last frame in log */
|
||||
int nByte; /* Number of bytes to allocate */
|
||||
sqlite3_int64 nByte; /* Number of bytes to allocate */
|
||||
int i; /* Iterator variable */
|
||||
ht_slot *aTmp; /* Temp space used by merge-sort */
|
||||
int rc = SQLITE_OK; /* Return Code */
|
||||
|
Reference in New Issue
Block a user