Unverified Commit 6a195a1b authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[SWIG] fix compiler warning about unused variable in SWIG (#4419)

* Update StringArray.i

* Update StringArray_API_extensions.i
parent 189a8018
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
StringArrayHandle StringArrayHandle_create(size_t num_strings, size_t string_size) { StringArrayHandle StringArrayHandle_create(size_t num_strings, size_t string_size) {
try { try {
return new StringArray(num_strings, string_size); return new StringArray(num_strings, string_size);
} catch (std::bad_alloc &e) { } catch (std::bad_alloc &/*e*/) {
return nullptr; return nullptr;
} }
} }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
try { try {
strings.reset(new StringArray(eval_counts, string_size)); strings.reset(new StringArray(eval_counts, string_size));
} catch (std::bad_alloc &e) { } catch (std::bad_alloc &/*e*/) {
LGBM_SetLastError("Failure to allocate memory."); LGBM_SetLastError("Failure to allocate memory.");
return nullptr; return nullptr;
} }
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
try { try {
strings.reset(new StringArray(num_features, max_feature_name_size)); 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."); LGBM_SetLastError("Failure to allocate memory.");
return nullptr; return nullptr;
} }
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
nullptr)); nullptr));
try { try {
strings.reset(new StringArray(num_features, max_feature_name_size)); 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."); LGBM_SetLastError("Failure to allocate memory.");
return nullptr; return nullptr;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment