]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests: fix NULL references to be acceptable by Clang 12880/head
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 11 Jan 2017 10:18:32 +0000 (11:18 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Wed, 11 Jan 2017 16:14:59 +0000 (17:14 +0100)
commitcbb2d65b87704d5f235f41fb06142fa2ff776dcf
tree898390f11d10978d66711da50df77684ec12b1c5
parent3aca476a977fdd1bf321a561a9be59bb12d7e8fe
tests: fix NULL references to be acceptable by Clang

 - On some platforms NULL evaluates to nullptr, which will require a
   cast to the right type to be able to compile.
      error: reinterpret_cast from 'nullptr_t' to 'ContextWQ *'

 - It is a delicate change since otherwise GCC will start complaining
   about the reverse:
      error: invalid static_cast from type 'const long int' to type 'ContextWQ*'

 By casting right at the instance of NULL both compilers are happy.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/librbd/exclusive_lock/test_mock_PreReleaseRequest.cc
src/test/librbd/journal/test_mock_OpenRequest.cc
src/test/librbd/journal/test_mock_PromoteRequest.cc
src/test/librbd/operation/test_mock_ResizeRequest.cc
src/test/librbd/operation/test_mock_SnapshotRollbackRequest.cc
src/test/librbd/test_mock_Journal.cc