Fix compile warnings
Former-commit-id: c314cab888e9c8b3e825b2dfe0c0392ee998bdc4
This commit is contained in:
parent
ba5b7a6da1
commit
50ce24a10c
@ -620,6 +620,7 @@ const dbBackup *backupDb(void) {
|
|||||||
/* Discard a previously created backup, this can be slow (similar to FLUSHALL)
|
/* Discard a previously created backup, this can be slow (similar to FLUSHALL)
|
||||||
* Arguments are similar to the ones of emptyDb, see EMPTYDB_ flags. */
|
* Arguments are similar to the ones of emptyDb, see EMPTYDB_ flags. */
|
||||||
void discardDbBackup(const dbBackup *backup, int flags, void(callback)(void*)) {
|
void discardDbBackup(const dbBackup *backup, int flags, void(callback)(void*)) {
|
||||||
|
UNUSED(callback);
|
||||||
int async = (flags & EMPTYDB_ASYNC);
|
int async = (flags & EMPTYDB_ASYNC);
|
||||||
|
|
||||||
/* Release main DBs backup . */
|
/* Release main DBs backup . */
|
||||||
|
@ -378,7 +378,7 @@ dictAsyncRehashCtl *dictRehashAsyncStart(dict *d, int buckets) {
|
|||||||
|
|
||||||
int empty_visits = buckets * 10;
|
int empty_visits = buckets * 10;
|
||||||
|
|
||||||
while (d->asyncdata->queue.size() < (size_t)buckets && d->rehashidx < d->ht[0].size) {
|
while (d->asyncdata->queue.size() < (size_t)buckets && (size_t)d->rehashidx < d->ht[0].size) {
|
||||||
dictEntry *de;
|
dictEntry *de;
|
||||||
|
|
||||||
/* Note that rehashidx can't overflow as we are sure there are more
|
/* Note that rehashidx can't overflow as we are sure there are more
|
||||||
@ -386,7 +386,7 @@ dictAsyncRehashCtl *dictRehashAsyncStart(dict *d, int buckets) {
|
|||||||
while(d->ht[0].table[d->rehashidx] == NULL) {
|
while(d->ht[0].table[d->rehashidx] == NULL) {
|
||||||
d->rehashidx++;
|
d->rehashidx++;
|
||||||
if (--empty_visits == 0) goto LDone;
|
if (--empty_visits == 0) goto LDone;
|
||||||
if (d->rehashidx >= d->ht[0].size) goto LDone;
|
if ((size_t)d->rehashidx >= d->ht[0].size) goto LDone;
|
||||||
}
|
}
|
||||||
|
|
||||||
de = d->ht[0].table[d->rehashidx];
|
de = d->ht[0].table[d->rehashidx];
|
||||||
@ -666,7 +666,7 @@ static dictEntry *dictGenericDelete(dict *d, const void *key, int nofree) {
|
|||||||
else
|
else
|
||||||
d->ht[table].table[idx] = he->next;
|
d->ht[table].table[idx] = he->next;
|
||||||
if (!nofree) {
|
if (!nofree) {
|
||||||
if (table == 0 && d->asyncdata != nullptr && idx < d->rehashidx) {
|
if (table == 0 && d->asyncdata != nullptr && (ssize_t)idx < d->rehashidx) {
|
||||||
he->next = d->asyncdata->deGCList;
|
he->next = d->asyncdata->deGCList;
|
||||||
d->asyncdata->deGCList = he->next;
|
d->asyncdata->deGCList = he->next;
|
||||||
} else {
|
} else {
|
||||||
@ -746,7 +746,7 @@ int _dictClear(dict *d, dictht *ht, void(callback)(void *)) {
|
|||||||
if ((he = ht->table[i]) == NULL) continue;
|
if ((he = ht->table[i]) == NULL) continue;
|
||||||
while(he) {
|
while(he) {
|
||||||
nextHe = he->next;
|
nextHe = he->next;
|
||||||
if (d->asyncdata && i < d->rehashidx) {
|
if (d->asyncdata && (ssize_t)i < d->rehashidx) {
|
||||||
he->next = d->asyncdata->deGCList;
|
he->next = d->asyncdata->deGCList;
|
||||||
d->asyncdata->deGCList = he;
|
d->asyncdata->deGCList = he;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user