Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various build issues #64

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ To run CLI extension of this library and let it parse RDB file to json:
]}
}]

To generate formatted print:

rdb-cli dump.rdb print --key "db%d,%k,%v"
db0,key1,value1
db0,key2,value2
...

To generate RESP commands:

Expand Down
2 changes: 1 addition & 1 deletion deps/redis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OBJECTS = $(patsubst %,%.o,$(SOURCES))
OPTIMIZATION?=-O3

STD = -std=c99
WARNS = -Wall -Wextra -pedantic -Werror
WARNS = -Wall -Wextra -pedantic
CFLAGS = -fPIC $(OPTIMIZATION) $(STD) $(WARNS) -fvisibility=hidden
DEBUG = -g3 -DDEBUG=1
LIBS =
Expand Down
2 changes: 1 addition & 1 deletion src/cli/rdb-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ int readCommonOptions(RdbParser *p, int argc, char* argv[], Options *options, in
return at;
}

void closeLogFileOnExit() {
void closeLogFileOnExit(void) {
if (logfile != NULL)
fclose(logfile);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ RdbStatus allocFromCache(RdbParser *p,

static inline RdbStatus unpackList(RdbParser *p, unsigned char *lp) {
unsigned char *eptr, *item;
unsigned int itemLen;
unsigned int itemLen = 0;
long long itemVal;

eptr = lpFirst( lp);
Expand Down
6 changes: 3 additions & 3 deletions test/test_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ int getRedisPort(void) {
return redisPort[currRedisInst];
}

void setValgrind() {
void setValgrind(void) {
useValgrind = 1;
}

Expand Down Expand Up @@ -503,7 +503,7 @@ void checkValgrindLog(const char *filename) {
/* Redis OSS does not support restoring module auxiliary data. This feature
* is currently available only in Redis Enterprise. There are plans to bring
* this functionality to Redis OSS in the near future. */
int isSupportRestoreModuleAux() {
int isSupportRestoreModuleAux(void) {
static int supported = -1; /* -1=UNINIT, 0=NO, 1=YES */
if (supported == -1) {
char *res = sendRedisCmd("RESTOREMODAUX", REDIS_REPLY_ERROR, NULL);
Expand Down Expand Up @@ -585,7 +585,7 @@ static unsigned char xorstr(const char *str) {
#define BUFFER_SIZE 1024
static int pipe_in[2], pipe_out[2];
static pid_t pid = -1;
void start_json_sign_service() {
void start_json_sign_service(void) {
if (pipe(pipe_in) == -1 || pipe(pipe_out) == -1) {
perror("pipe failed");
exit(1);
Expand Down
2 changes: 1 addition & 1 deletion test/test_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void assert_json_equal(const char *f1, const char *f2, int ignoreListOrder);
/* Test against Redis Server */
void setRedisInstallFolder(const char *path);
int getRedisPort(void);
void setValgrind();
void setValgrind(void);
void setupRedisServer(const char *extraArgs);
const char *getTargetRedisVersion(int *major, int *minor); /* call only after setupRedisServer() */
void teardownRedisServer(void);
Expand Down
Loading