Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pb.h
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-04-05 14:25:44 +0400
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-04-05 14:25:44 +0400
commit7880f308ea996292d5e28a81618370d79e2bdf26 (patch)
treef0f911f9d5966937450fe9573cc9b46e625201a3 /pb.h
parentb63e582bdb34b4727a8eb551fc72ee0476047a46 (diff)
Fix unused parameter warning when building without errmsg.
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 63d313d..aca96ee 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) \