Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings. #8022

Merged
merged 9 commits into from Jun 22, 2022
Merged

Fix compiler warnings. #8022

merged 9 commits into from Jun 22, 2022

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Jun 22, 2022

  • Remove/fix unused parameters
  • Remove deprecated code in rabit.
  • Update dmlc-core.

Using nvcc 11.6 and gcc 9.4.0, only 1 warning remains:

hist_util.cc:43:89: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class xgboost::detail::GradientPairInternal<double>’; use assignment or value-initialization instead [-Wclass-memaccess]
   43 |   memset(hist.data() + begin, '\0', (end - begin) * sizeof(xgboost::GradientPairPrecise));
      |                                                                                         ^

This one requires some benchmarking. We can prepare for turning warnings into errors on CI once we start using a newer version of CUDA.

@trivialfis
Copy link
Member Author

@@ -397,7 +397,7 @@ class TCPSocket : public Socket{
*/
inline void Create(int af = PF_INET) {
#if !IS_MINGW()
sockfd = socket(PF_INET, SOCK_STREAM, 0);
sockfd = socket(af, SOCK_STREAM, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!!!!???

@trivialfis trivialfis merged commit 142a208 into dmlc:master Jun 22, 2022
@trivialfis trivialfis deleted the compiler-warnings branch June 22, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants