]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
chimera: silence gcc-8 exception catch warning
authorWang, Xiang W <xiang.w.wang@intel.com>
Mon, 3 Dec 2018 03:31:44 +0000 (22:31 -0500)
committerChang, Harry <harry.chang@intel.com>
Mon, 21 Jan 2019 01:56:29 +0000 (09:56 +0800)
chimera/ch_compile.cpp

index c71e26e0ff03cbc835a5bb7ab91ae0dfdd2fed1d..374bd7ad86afe8a640f10b9f1d8d9a97a0b758e1 100644 (file)
@@ -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_compile_error_t *>(&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_compile_error_t *>(&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_compile_error_t *>(&ch_enomem);
         return CH_COMPILER_ERROR;