common: use _val for local variable in a macro Passing 'val' to this macro results in a legitimate warning: variable 'val' is uninitialized when used within its own initialization The simplest way to avoid this is to prefix the local variable with an underscore to make this scenario less likely. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
1 files changed, 3 insertions(+), 3 deletions(-) M common/qso-pack.c
M common/qso-pack.c +3 -3
@@ 389,11 389,11 @@ struct buffer *qso_pack_hlq(const struct #define _KV(buf, ns, k, v) \ ({ \ - struct val *val = (v); \ + struct val *_val = (v); \ int ret; \ \ - ret = hlq_append_kv((buf), (ver), (ns), (k), val); \ - val_putref(val); \ + ret = hlq_append_kv((buf), (ver), (ns), (k), _val); \ + val_putref(_val); \ ret; \ }) #define KV(buf, ns, k, v) CHECK(_KV(buf, ns, k, v))