From c7c411975015cfdb6de04cfb00b1b7b9b4687507 Mon Sep 17 00:00:00 2001 From: "Wang, Xiang W" Date: Sun, 2 Dec 2018 22:31:44 -0500 Subject: [PATCH] chimera: silence gcc-8 exception catch warning --- chimera/ch_compile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chimera/ch_compile.cpp b/chimera/ch_compile.cpp index c71e26e0..374bd7ad 100644 --- a/chimera/ch_compile.cpp +++ b/chimera/ch_compile.cpp @@ -714,7 +714,7 @@ ch_error_t HS_CDECL ch_compile(const char *expression, unsigned flags, (int)e.index : -1); return CH_COMPILER_ERROR; } - catch (std::bad_alloc) { + catch (std::bad_alloc &) { *db = nullptr; *comp_error = const_cast(&ch_enomem); return CH_COMPILER_ERROR; @@ -782,7 +782,7 @@ ch_error_t HS_CDECL ch_compile_multi(const char *const *expressions, (int)e.index : -1); return CH_COMPILER_ERROR; } - catch (std::bad_alloc) { + catch (std::bad_alloc &) { *db = nullptr; *comp_error = const_cast(&ch_enomem); return CH_COMPILER_ERROR; @@ -855,7 +855,7 @@ ch_error_t HS_CDECL ch_compile_ext_multi( (int)e.index : -1); return CH_COMPILER_ERROR; } - catch (std::bad_alloc) { + catch (std::bad_alloc &) { *db = nullptr; *comp_error = const_cast(&ch_enomem); return CH_COMPILER_ERROR;