aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-04-05 13:25:44 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-04-05 13:25:44 +0300
commit7880f308ea996292d5e28a81618370d79e2bdf26 (patch)
treef0f911f9d5966937450fe9573cc9b46e625201a3
parentb63e582bdb34b4727a8eb551fc72ee0476047a46 (diff)
Fix unused parameter warning when building without errmsg.
-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) \