From e087947c84ee6b7d86abe9585ee51efee7595a26 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Sat, 16 May 2015 13:46:48 -0700 Subject: Enabled asserts() and verbosity for most Travis builds. Also added a separate ndebug build for testing that -DNDEBUG builds still work. Also disabled reference debugging by default, since it requires either a global lock or -DUPB_THREAD_UNSAFE. --- upb/pb/decoder.c | 2 +- upb/refcounted.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'upb') diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c index c37953a..0c3955a 100644 --- a/upb/pb/decoder.c +++ b/upb/pb/decoder.c @@ -874,7 +874,7 @@ bool upb_pbdecoder_end(void *closure, const void *handler_data) { assert(getop(*d->pc) == OP_TAG1 || getop(*d->pc) == OP_TAG2 || getop(*d->pc) == OP_TAGN || - getop(*d->pc == OP_DISPATCH)); + getop(*d->pc) == OP_DISPATCH); d->pc = p; } upb_pbdecoder_decode(closure, handler_data, &dummy, 0, NULL); diff --git a/upb/refcounted.h b/upb/refcounted.h index 3de4a12..fe77077 100644 --- a/upb/refcounted.h +++ b/upb/refcounted.h @@ -28,9 +28,9 @@ // // Enabling this requires the application to define upb_lock()/upb_unlock() // functions that acquire/release a global mutex (or #define UPB_THREAD_UNSAFE). -#ifndef NDEBUG -#define UPB_DEBUG_REFS -#endif +// For this reason we don't enable it by default, even in debug builds. + +// #define UPB_DEBUG_REFS #ifdef __cplusplus namespace upb { class RefCounted; } -- cgit v1.2.3