Skip to content

Commit

Permalink
[R-package] suppress Wcast-function-type warning in CMake-based gcc a…
Browse files Browse the repository at this point in the history
…nd MinGW builds (fixes microsoft#4273)
  • Loading branch information
jameslamb committed May 10, 2021
1 parent 08d1ce4 commit c8d3b84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R-package/src/lightgbm_R.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ SEXP LGBM_BoosterDumpModel_R(LGBM_SE handle,
R_API_END();
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
// .Call() calls
static const R_CallMethodDef CallEntries[] = {
{"LGBM_GetLastError_R" , (DL_FUNC) &LGBM_GetLastError_R , 0},
Expand Down Expand Up @@ -725,6 +727,7 @@ static const R_CallMethodDef CallEntries[] = {
{"LGBM_BoosterDumpModel_R" , (DL_FUNC) &LGBM_BoosterDumpModel_R , 3},
{NULL, NULL, 0}
};
#pragma GCC diagnostic pop

LIGHTGBM_C_EXPORT void R_init_lightgbm(DllInfo *dll);

Expand Down

0 comments on commit c8d3b84

Please sign in to comment.