mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 01:04:13 +08:00
mdbx-test-extra: устранение минорных предупреждений старых компиляторов.
This commit is contained in:
parent
4fd21d2f7b
commit
2abf80a199
@ -12,8 +12,8 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static int dump(MDBX_cursor *cur) {
|
static int dump(MDBX_cursor *cur) {
|
||||||
MDBX_val key = {};
|
MDBX_val key = {NULL, 0};
|
||||||
MDBX_val data = {};
|
MDBX_val data = {NULL, 0};
|
||||||
int rc = mdbx_cursor_get(cur, &key, &data, MDBX_FIRST);
|
int rc = mdbx_cursor_get(cur, &key, &data, MDBX_FIRST);
|
||||||
|
|
||||||
while (rc == 0) {
|
while (rc == 0) {
|
||||||
@ -25,15 +25,14 @@ static int dump(MDBX_cursor *cur) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int clear(MDBX_cursor *cur) {
|
static int clear(MDBX_cursor *cur) {
|
||||||
MDBX_val key = {};
|
MDBX_val key = {NULL, 0};
|
||||||
MDBX_val data = {};
|
MDBX_val data = {NULL, 0};
|
||||||
int rc = mdbx_cursor_get(cur, &key, &data, MDBX_FIRST);
|
int rc = mdbx_cursor_get(cur, &key, &data, MDBX_FIRST);
|
||||||
|
|
||||||
while (rc == 0) {
|
while (rc == 0) {
|
||||||
rc = mdbx_cursor_del(cur, MDBX_ALLDUPS);
|
rc = mdbx_cursor_del(cur, MDBX_ALLDUPS);
|
||||||
if (rc) {
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
|
||||||
rc = mdbx_cursor_get(cur, &key, &data, MDBX_NEXT);
|
rc = mdbx_cursor_get(cur, &key, &data, MDBX_NEXT);
|
||||||
}
|
}
|
||||||
return (rc == MDBX_NOTFOUND) ? 0 : rc;
|
return (rc == MDBX_NOTFOUND) ? 0 : rc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user