mirror of https://github.com/wb2osz/direwolf.git
Mitigate impact of cmake defining NDEBUG.
This commit is contained in:
parent
d9d6bb4257
commit
edafba9fe6
|
@ -418,7 +418,8 @@ packet_t ax25_from_text (char *monitor, int strict)
|
|||
|
||||
this_p->frame_len = 7 + 7 + 1 + 1;
|
||||
this_p->num_addr = (-1);
|
||||
assert (ax25_get_num_addr(this_p) == 2);
|
||||
(void) ax25_get_num_addr(this_p); // when num_addr is -1, this sets it properly.
|
||||
assert (this_p->num_addr == 2);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
// TODO: include this file first before anything else in each .c file.
|
||||
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG // Because it would disable assert().
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef DIREWOLF_H
|
||||
#define DIREWOLF_H 1
|
||||
|
||||
|
|
3
xid.c
3
xid.c
|
@ -665,6 +665,9 @@ int main (int argc, char *argv[]) {
|
|||
|
||||
text_color_set (DW_COLOR_ERROR);
|
||||
|
||||
#ifdef NDEBUG
|
||||
#error "This won't work properly if NDEBUG is defined. It should be undefined in direwolf.h"
|
||||
#endif
|
||||
assert (n==1);
|
||||
assert (param.full_duplex == 0);
|
||||
assert (param.srej == srej_single);
|
||||
|
|
Loading…
Reference in New Issue