Fix unused parameter warning when building without errmsg.
This commit is contained in:
6
pb.h
6
pb.h
@@ -500,7 +500,11 @@ struct _pb_extension_t {
|
|||||||
* messages if not used.
|
* messages if not used.
|
||||||
*/
|
*/
|
||||||
#ifdef PB_NO_ERRMSG
|
#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)"
|
#define PB_GET_ERROR(stream) "(errmsg disabled)"
|
||||||
#else
|
#else
|
||||||
#define PB_RETURN_ERROR(stream,msg) \
|
#define PB_RETURN_ERROR(stream,msg) \
|
||||||
|
|||||||
Reference in New Issue
Block a user