diff options
author | heretic <heretic@yandex-team.com> | 2022-08-11 18:21:56 +0300 |
---|---|---|
committer | heretic <heretic@yandex-team.com> | 2022-08-11 18:21:56 +0300 |
commit | a8229c6d068b0f0b531da654610cbacf788db41f (patch) | |
tree | 8aa58edc9ec634a0a4b8aba7825c1ae2789aaedf | |
parent | 12b29c0456df718b7137cf270cbecd5b98b6fc24 (diff) | |
download | ydb-a8229c6d068b0f0b531da654610cbacf788db41f.tar.gz |
Prepare to clang14: library/cpp/binsaver -Wnull-pointer-subtraction
fix library/cpp/binsaver
-rw-r--r-- | library/cpp/binsaver/bin_saver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/cpp/binsaver/bin_saver.cpp b/library/cpp/binsaver/bin_saver.cpp index fe0775af9f..5c0e28f24c 100644 --- a/library/cpp/binsaver/bin_saver.cpp +++ b/library/cpp/binsaver/bin_saver.cpp @@ -18,7 +18,7 @@ void IBinSaver::StoreObject(IObjectBase* pObject) { Y_ASSERT(pSaverClasses->GetObjectTypeID(pObject) != -1 && "trying to save unregistered object"); } - ui64 ptrId = ((char*)pObject) - ((char*)nullptr); + ui64 ptrId = reinterpret_cast<ui64>(pObject) / sizeof(char); if (StableOutput) { ui32 id = 0; if (pObject) { |