diff --git a/swig/StringArray.i b/swig/StringArray.i index 826a90ba8..b179b02df 100644 --- a/swig/StringArray.i +++ b/swig/StringArray.i @@ -31,7 +31,7 @@ StringArrayHandle StringArrayHandle_create(size_t num_strings, size_t string_size) { try { return new StringArray(num_strings, string_size); - } catch (std::bad_alloc &e) { + } catch (std::bad_alloc &/*e*/) { return nullptr; } } diff --git a/swig/StringArray_API_extensions.i b/swig/StringArray_API_extensions.i index 7ffcfbb57..998576579 100644 --- a/swig/StringArray_API_extensions.i +++ b/swig/StringArray_API_extensions.i @@ -54,7 +54,7 @@ try { strings.reset(new StringArray(eval_counts, string_size)); - } catch (std::bad_alloc &e) { + } catch (std::bad_alloc &/*e*/) { LGBM_SetLastError("Failure to allocate memory."); return nullptr; } @@ -92,7 +92,7 @@ try { strings.reset(new StringArray(num_features, max_feature_name_size)); - } catch (std::bad_alloc &e) { + } catch (std::bad_alloc &/*e*/) { LGBM_SetLastError("Failure to allocate memory."); return nullptr; } @@ -131,7 +131,7 @@ nullptr)); try { strings.reset(new StringArray(num_features, max_feature_name_size)); - } catch (std::bad_alloc &e) { + } catch (std::bad_alloc &/*e*/) { LGBM_SetLastError("Failure to allocate memory."); return nullptr; }