Skip to content

Conversation

@ihsandemir
Copy link
Collaborator

Fixed warning in windows compilation. Most warnings were due to type conversions and dll imports.

fixes #1350

@ihsandemir ihsandemir added this to the 5.6.0 milestone Dec 26, 2025
@ihsandemir ihsandemir self-assigned this Dec 26, 2025
Copy link
Contributor

@JackPGreen JackPGreen left a comment

Choose a reason for hiding this comment

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

The changes mostly seem to be tightening types (explicit casting etc).
I don't know which warning(s) are being fixed, but I have no real issue with the changes as presented beyond what I've highlighted.

emreyigit
emreyigit previously approved these changes Dec 29, 2025
Copy link
Contributor

@JackPGreen JackPGreen left a comment

Choose a reason for hiding this comment

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

Re-reviewed (GitHub forced me to add a comment as well)

ihsandemir added a commit to ihsandemir/hazelcast-cpp-client that referenced this pull request Dec 30, 2025
…AGS [HZ-5297] (hazelcast#1386)

Replaced `sizeof(frame_header_type)` with
`SIZE_OF_FRAME_LENGTH_AND_FLAGS`.

fixes
hazelcast#1385 (comment)
@ihsandemir ihsandemir reopened this Dec 30, 2025
@ihsandemir ihsandemir changed the title Fixed warning in windows compilation [HZ-5297] Fixed warnings in windows compilation [HZ-5297] Dec 30, 2025
@ihsandemir ihsandemir enabled auto-merge (squash) December 30, 2025 08:52
ihsandemir and others added 9 commits January 5, 2026 10:46
```
hazelcast-cpp-client\hazelcast\src\hazelcast\client\compact.cpp(3349,58): warning C4146: unary minus operator applied to unsigned type, result still unsigned
```
The original code `-(fp & 1L)` does convert the -1 tu uint64_t implicitly but this causes a compiler warning, instead we explicitly cast it and multiply to get the same result. Regarding the value of -(fp & 1L), this is 0 if least siginificant bit of fp is 0 otherwise it results in negated value of 1 which is all 1 bits uint64_t.
#include "hazelcast/util/export.h"
#include "hazelcast/client/serialization/pimpl/compact/field_descriptor.h"

#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn’t be here. Disabled globally already?
(Also occurs elsewhere)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, you are right. i do not know how it became like this given the rebasing. I fixed them now in 2 files.

@ihsandemir ihsandemir requested a review from JackPGreen January 5, 2026 09:18
} // namespace serialization
} // namespace client
} // namespace hazelcast
} // namespace hazelcast
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit - change of line ending

@ihsandemir ihsandemir merged commit 452a25c into hazelcast:master Jan 5, 2026
31 checks passed
@ihsandemir ihsandemir deleted the warningFixes branch January 5, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning on Windows Builds [API-2342]

3 participants