redis / hiredis

Minimalistic C client for Redis >= 1.2
BSD 3-Clause "New" or "Revised" License
6.15k stars 1.8k forks source link

unused parameter warning #1256

Closed error0g closed 2 months ago

error0g commented 2 months ago

In the redisvAppendCommand method in the hiredis.c file, two parameters, format and ap, are not used, resulting in a compilation error.

detail:

hiredis.c: In function ‘redisvAppendCommand’:
hiredis.c:1128:54: error: unused parameter ‘format’ [-Werror=unused-parameter]
int redisvAppendCommand(redisContext *c, const char *format, va_list ap) {
                                                        ^
hiredis.c:1128:70: error: unused parameter ‘ap’ [-Werror=unused-parameter]
 int redisvAppendCommand(redisContext *c, const char *format, va_list ap) {
                                                                       ^
cc1: all warnings being treated as errors
make: *** [hiredis.o] Error 1
michael-grunder commented 2 months ago

I'm confused by this. We are using those args in redisvAppendCommand.

https://github.com/redis/hiredis/blob/19cfd60d92da1fdb958568cdd7d36264ab14e666/hiredis.c#L1139

But if you can provide a docker image that replicates this error I'm happy to resolve it.

error0g commented 2 months ago

I'm confused by this. We are using those args in redisvAppendCommand.

https://github.com/redis/hiredis/blob/19cfd60d92da1fdb958568cdd7d36264ab14e666/hiredis.c#L1139

But if you can provide a docker image that replicates this error I'm happy to resolve it.

It might be an issue with missing local code. Thank you.