From 7880f308ea996292d5e28a81618370d79e2bdf26 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sat, 5 Apr 2014 13:25:44 +0300 Subject: Fix unused parameter warning when building without errmsg. --- pb.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pb.h b/pb.h index 63d313dc..aca96ee9 100644 --- a/pb.h +++ b/pb.h @@ -500,7 +500,11 @@ struct _pb_extension_t { * messages if not used. */ #ifdef PB_NO_ERRMSG -#define PB_RETURN_ERROR(stream,msg) return false +#define PB_RETURN_ERROR(stream,msg) \ + do {\ + UNUSED(stream); \ + return false; \ + } while(0) #define PB_GET_ERROR(stream) "(errmsg disabled)" #else #define PB_RETURN_ERROR(stream,msg) \ -- cgit 1.2.3-korg