diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-04-05 13:25:44 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-04-05 13:25:44 +0300 |
commit | 7880f308ea996292d5e28a81618370d79e2bdf26 (patch) | |
tree | f0f911f9d5966937450fe9573cc9b46e625201a3 | |
parent | b63e582bdb34b4727a8eb551fc72ee0476047a46 (diff) |
Fix unused parameter warning when building without errmsg.
-rw-r--r-- | pb.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) \ |