aboutsummaryrefslogtreecommitdiffstats
path: root/pb.h
diff options
context:
space:
mode:
Diffstat (limited to 'pb.h')
-rw-r--r--pb.h6
1 files changed, 5 insertions, 1 deletions
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) \