[R] Fix clang warning. (#9874)

This commit is contained in:
Jiaming Yuan 2023-12-15 01:30:43 +08:00 committed by GitHub
parent 125bc812f8
commit 1c6e031c75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,12 +154,12 @@ SEXP SafeMkChar(const char *c_str, SEXP continuation_token) {
} \
PutRNGstate();
/*!
* \brief macro to check the call.
/**
* @brief Macro for checking XGBoost return code.
*/
#define CHECK_CALL(x) \
if ((x) != 0) { \
error(XGBGetLastError()); \
#define CHECK_CALL(__rc) \
if ((__rc) != 0) { \
Rf_error("%s", XGBGetLastError()); \
}
using dmlc::BeginPtr;