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

include: fix IS_ERR on Windows #47818

Merged
merged 1 commit into from Sep 2, 2022
Merged

Conversation

petrutlucian94
Copy link
Contributor

@petrutlucian94 petrutlucian94 commented Aug 26, 2022

include: fix IS_ERR on Windows

The "long" type uses 32b on x64 Windows platforms, which means
it's not large enough to store a pointer. intptr_t or uintptr_t
should be used instead.

This change fixes include/err.h, using the right types. There was
a previous patch on this topic but unfortunately it didn't address
all the type casts.

This issue was brought up by the unittest_crush test, which recently
started to fail as the CrushWrapper methods use IS_ERR.

Fixes: https://tracker.ceph.com/issues/57308
Signed-off-by: Lucian Petrut lpetrut@cloudbasesolutions.com

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@petrutlucian94 petrutlucian94 added the win32 Specifix changes for the windows platform label Aug 26, 2022
@petrutlucian94
Copy link
Contributor Author

jenkins test windows

src/include/err.h Outdated Show resolved Hide resolved
The "long" type uses 32b on x64 Windows platforms, which means
it's not large enough to store a pointer. intptr_t or uintptr_t
should be used instead.

This change fixes include/err.h, using the right types. There was
a previous patch on this topic but unfortunately it didn't address
all the type casts.

This issue was brought up by the unittest_crush test, which recently
started to fail as the CrushWrapper methods use IS_ERR.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
@idryomov
Copy link
Contributor

jenkins test make check

@petrutlucian94
Copy link
Contributor Author

jenkins test windows

@petrutlucian94
Copy link
Contributor Author

jenkins test make check arm64

1 similar comment
@petrutlucian94
Copy link
Contributor Author

jenkins test make check arm64

@idryomov
Copy link
Contributor

idryomov commented Sep 3, 2022

@djgalloway FWIW this had a pending needs-qa label and should not have been merged over it. Despite "on Windows" in the title, it changed the type for all platforms and, however trivial, it is better to run such things through at least one of the suites first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix needs-qa win32 Specifix changes for the windows platform
Projects
None yet
3 participants