diff --git a/src/modules/hellotype.c b/src/modules/hellotype.c index b33ed81cd4ff31759a66f521455c81b449267e53..535eb88e1f2f0d5ffc1be0ece64df7a03766f255 100644 --- a/src/modules/hellotype.c +++ b/src/modules/hellotype.c @@ -227,6 +227,8 @@ void HelloTypeAofRewrite(RedisModuleIO *aof, RedisModuleString *key, void *value } void HelloTypeDigest(RedisModuleDigest *digest, void *value) { + REDISMODULE_NOT_USED(digest); + REDISMODULE_NOT_USED(value); /* TODO: The DIGEST module interface is yet not implemented. */ } @@ -237,6 +239,9 @@ void HelloTypeFree(void *value) { /* This function must be present on each Redis module. It is used in order to * register the commands into the Redis server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { + REDISMODULE_NOT_USED(argv); + REDISMODULE_NOT_USED(argc); + if (RedisModule_Init(ctx,"hellotype",1,REDISMODULE_APIVER_1) == REDISMODULE_ERR) return REDISMODULE_ERR; diff --git a/src/modules/testmodule.c b/src/modules/testmodule.c index db809a8e63e5bce300c576b9f080c10fd77ac674..8da45c0ea664c6d6677c5b6f7137fcf3cddd7f3d 100644 --- a/src/modules/testmodule.c +++ b/src/modules/testmodule.c @@ -48,6 +48,9 @@ int TestMatchReply(RedisModuleCallReply *reply, char *str) { /* TEST.CALL -- Test Call() API. */ int TestCall(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { + REDISMODULE_NOT_USED(argv); + REDISMODULE_NOT_USED(argc); + RedisModule_AutoMemory(ctx); RedisModuleCallReply *reply; @@ -75,6 +78,9 @@ fail: /* TEST.STRING.APPEND -- Test appending to an existing string object. */ int TestStringAppend(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { + REDISMODULE_NOT_USED(argv); + REDISMODULE_NOT_USED(argc); + RedisModuleString *s = RedisModule_CreateString(ctx,"foo",3); RedisModule_StringAppendBuffer(ctx,s,"bar",3); RedisModule_ReplyWithString(ctx,s); @@ -84,6 +90,9 @@ int TestStringAppend(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { /* TEST.STRING.APPEND.AM -- Test append with retain when auto memory is on. */ int TestStringAppendAM(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { + REDISMODULE_NOT_USED(argv); + REDISMODULE_NOT_USED(argc); + RedisModule_AutoMemory(ctx); RedisModuleString *s = RedisModule_CreateString(ctx,"foo",3); RedisModule_RetainString(ctx,s); @@ -163,6 +172,9 @@ int TestAssertIntegerReply(RedisModuleCtx *ctx, RedisModuleCallReply *reply, lon /* TEST.IT -- Run all the tests. */ int TestIt(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { + REDISMODULE_NOT_USED(argv); + REDISMODULE_NOT_USED(argc); + RedisModule_AutoMemory(ctx); RedisModuleCallReply *reply; @@ -195,6 +207,9 @@ fail: } int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { + REDISMODULE_NOT_USED(argv); + REDISMODULE_NOT_USED(argc); + if (RedisModule_Init(ctx,"test",1,REDISMODULE_APIVER_1) == REDISMODULE_ERR) return REDISMODULE_ERR; diff --git a/src/redismodule.h b/src/redismodule.h index eaf5dfab170b91dc8e3351ab8af10345f2467e07..4743fa98cb53a47b1ea0f94a9226ce97b395318a 100644 --- a/src/redismodule.h +++ b/src/redismodule.h @@ -68,6 +68,8 @@ #define REDISMODULE_POSITIVE_INFINITE (1.0/0.0) #define REDISMODULE_NEGATIVE_INFINITE (-1.0/0.0) +#define REDISMODULE_NOT_USED(V) ((void) V) + /* ------------------------- End of common defines ------------------------ */ #ifndef REDISMODULE_CORE