From: Wang, Xiang W Date: Mon, 3 Dec 2018 03:31:44 +0000 (-0500) Subject: chimera: silence gcc-8 exception catch warning X-Git-Tag: v5.1.0^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7c411975015cfdb6de04cfb00b1b7b9b4687507;p=thirdparty%2Fvectorscan.git chimera: silence gcc-8 exception catch warning --- 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;