diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-04-05 14:25:44 +0400 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-04-05 14:25:44 +0400 |
commit | 7880f308ea996292d5e28a81618370d79e2bdf26 (patch) | |
tree | f0f911f9d5966937450fe9573cc9b46e625201a3 /pb.h | |
parent | b63e582bdb34b4727a8eb551fc72ee0476047a46 (diff) |
Fix unused parameter warning when building without errmsg.
Diffstat (limited to 'pb.h')
-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) \ |