mirror of https://gitee.com/openkylin/qemu.git
Fix build with -DNDEBUG in CFLAGS
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
090414a30c
commit
a6c6f76ceb
|
@ -2462,10 +2462,13 @@ static int handle_commits(BDRVVVFATState* s)
|
||||||
fail = -2;
|
fail = -2;
|
||||||
break;
|
break;
|
||||||
case ACTION_WRITEOUT: {
|
case ACTION_WRITEOUT: {
|
||||||
|
#ifndef NDEBUG
|
||||||
|
/* these variables are only used by assert() below */
|
||||||
direntry_t* entry = array_get(&(s->directory),
|
direntry_t* entry = array_get(&(s->directory),
|
||||||
commit->param.writeout.dir_index);
|
commit->param.writeout.dir_index);
|
||||||
uint32_t begin = begin_of_direntry(entry);
|
uint32_t begin = begin_of_direntry(entry);
|
||||||
mapping_t* mapping = find_mapping_for_cluster(s, begin);
|
mapping_t* mapping = find_mapping_for_cluster(s, begin);
|
||||||
|
#endif
|
||||||
|
|
||||||
assert(mapping);
|
assert(mapping);
|
||||||
assert(mapping->begin == begin);
|
assert(mapping->begin == begin);
|
||||||
|
|
|
@ -412,7 +412,7 @@ static void QEMU_NORETURN force_sig(int target_sig)
|
||||||
|
|
||||||
/* unreachable */
|
/* unreachable */
|
||||||
assert(0);
|
assert(0);
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* queue a signal so that it will be send to the virtual CPU as soon
|
/* queue a signal so that it will be send to the virtual CPU as soon
|
||||||
|
|
1
qdict.c
1
qdict.c
|
@ -195,6 +195,7 @@ double qdict_get_double(const QDict *qdict, const char *key)
|
||||||
return qint_get_int(qobject_to_qint(obj));
|
return qint_get_int(qobject_to_qint(obj));
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
return 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_TCG
|
#if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG)
|
||||||
/* define it to suppress various consistency checks (faster) */
|
/* define it to suppress various consistency checks (faster) */
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue