diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-05-16 13:46:48 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-05-16 14:18:22 -0700 |
commit | e087947c84ee6b7d86abe9585ee51efee7595a26 (patch) | |
tree | a7ca60b66be0f428645b15f71a7b1c4e190ddcf1 /upb | |
parent | 93791bfe65d210385ab1fb1eb1ccd77fca18b2bf (diff) |
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.
Diffstat (limited to 'upb')
-rw-r--r-- | upb/pb/decoder.c | 2 | ||||
-rw-r--r-- | upb/refcounted.h | 6 |
2 files changed, 4 insertions, 4 deletions
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; } |