From 0214653baa7d9417ae878e0796db4fcc395399a4 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 23 Oct 2014 19:56:47 +0200 Subject: [PATCH] mon_store_converter.cc: move convert() call out of assert() The convert() call is changing data. To prevent Heisenbugs depending in NDEBUG definition (e.g. if debug is off). Move convert() call out of the assert call and use assert only on the result value of the call. Signed-off-by: Danny Al-Gaaf --- src/tools/mon_store_converter.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/mon_store_converter.cc b/src/tools/mon_store_converter.cc index 7b8add8cd0627..59b3265dd8555 100644 --- a/src/tools/mon_store_converter.cc +++ b/src/tools/mon_store_converter.cc @@ -325,7 +325,8 @@ int main(int argc, const char *argv[]) string store(args[0]); string new_store(store); MonitorStoreConverter converter(store, new_store); - assert(!converter.convert()); + int ret = converter.convert(); + assert(!ret); assert(converter.match()); std::cout << "store successfully converted to new format" << std::endl; -- 2.39.5