Skip to content

Commit

Permalink
[SWIG] fix compiler warning about unused variable in SWIG (#4419)
Browse files Browse the repository at this point in the history
* Update StringArray.i

* Update StringArray_API_extensions.i
  • Loading branch information
StrikerRUS authored Jun 30, 2021
1 parent 189a801 commit 6a195a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion swig/StringArray.i
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
6 changes: 3 additions & 3 deletions swig/StringArray_API_extensions.i
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6a195a1

Please sign in to comment.