Skip to content

Commit

Permalink
Use clang-15 for CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
tezc committed Sep 20, 2023
1 parent 1f3e87e commit 2931f69
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
build-clang:
runs-on: ubuntu-latest
env:
CC: clang
CC: clang-15
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion examples/example1.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void logger(RdbLogLevel l, const char *msg) {
* Example of RDB to Json file conversion. It also shows the usage
* of two FilterKey.
*******************************************************************/
int main() {
int main(void) {
RdbParser *parser;
RdbxReaderFile *reader;
RdbxToJson *rdbToJson;
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 @@ -52,7 +52,7 @@ static void loggerWrap(RdbLogLevel l, const char *msg, ...) {
logger(l, tmp);
}

static void printUsage() {
static void printUsage(void) {
printf("[v%s] ", RDB_getLibVersion(NULL,NULL,NULL));
printf("Usage: rdb-cli /path/to/dump.rdb [OPTIONS] {json|resp|redis} [FORMAT_OPTIONS]\n");
printf("OPTIONS:\n");
Expand Down
10 changes: 5 additions & 5 deletions test/test_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ char *readFile(const char *filename, size_t *length) {
return str;
}

void cleanTmpFolder() {
void cleanTmpFolder(void) {
const char *folder_path = "./test/tmp";

DIR *dir = opendir(folder_path);
Expand Down Expand Up @@ -179,7 +179,7 @@ int findFreePort(int startPort, int endPort) {
return -1;
}

void cleanupRedisServer() {
void cleanupRedisServer(void) {
if (redisPID)
kill(redisPID, SIGTERM);
}
Expand Down Expand Up @@ -305,7 +305,7 @@ void setupRedisServer(const char *installFolder) {
}
}

void teardownRedisServer() {
void teardownRedisServer(void) {
if (redisConnContext) {
assert_non_null(redisConnContext);
assert_null(redisCommand(redisConnContext, "SHUTDOWN"));
Expand All @@ -315,14 +315,14 @@ void teardownRedisServer() {
}
}

int isSetRedisServer() {
int isSetRedisServer(void) {
return (redisConnContext != NULL);
}

/* 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
26 changes: 13 additions & 13 deletions test/test_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ void assert_json_equal(const char *f1, const char *f2, int ignoreListOrder);
/* Test against Redis Server */
extern int redisPort;
void setupRedisServer(const char *installFolder);
void teardownRedisServer();
int isSetRedisServer();
void teardownRedisServer(void);
int isSetRedisServer(void);
char *sendRedisCmd(char *cmd, int expRetType, char *expRsp);
int isSupportRestoreModuleAux();
int isSupportRestoreModuleAux(void);

/* test groups */
int group_rdb_to_redis();
int group_test_rdb_cli();
int group_rdb_to_resp();
int group_main();
int group_rdb_to_json();
int group_mem_management();
int group_pause();
int group_bulk_ops();
int group_test_resp_reader();
int group_rdb_to_redis(void);
int group_test_rdb_cli(void);
int group_rdb_to_resp(void);
int group_main(void);
int group_rdb_to_json(void);
int group_mem_management(void);
int group_pause(void);
int group_bulk_ops(void);
int group_test_resp_reader(void);

/* simulate external malloc */
void *xmalloc(size_t size);
Expand All @@ -56,7 +56,7 @@ void xfree(void *ptr);
void *xrealloc(void *ptr, size_t size);

char *readFile(const char *filename, size_t *len);
void cleanTmpFolder();
void cleanTmpFolder(void);
void setEnvVar (const char *name, const char *val);
char *substring(char *str, size_t len, char *substr);
void assert_file_payload(const char *filename, char *expData, int expLen, MatchType matchType, int expMatch);
2 changes: 1 addition & 1 deletion test/test_rdb_to_redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static void test_rdb_to_redis_del_before_write(void **state) {
}

/*************************** group_rdb_to_redis *******************************/
int group_rdb_to_redis() {
int group_rdb_to_redis(void) {

if (!isSetRedisServer()) {
printf("[ SKIPPED ] (Redis installation folder is not configured)\n");
Expand Down

0 comments on commit 2931f69

Please sign in to comment.