PS-10045: fix compiler warnings in kmipcore/kmipclient and tighten ma…#31
Open
lukin-oleksiy wants to merge 1 commit into
Open
PS-10045: fix compiler warnings in kmipcore/kmipclient and tighten ma…#31lukin-oleksiy wants to merge 1 commit into
lukin-oleksiy wants to merge 1 commit into
Conversation
…intainer warning mode https://perconadev.atlassian.net/browse/PS-10045 - add/cleanup maintainer warning profiles in kmipcore and kmipclient CMake (target-scoped flags, optional WARNINGS_AS_ERRORS) - fix warning diagnostics across sources: - remove unused variables in kmipcore tests and kmippp - fix conversion/sign-conversion and cast-qual warnings - fix shadowed names and extra semicolons - fix struct/class forward-declaration mismatch - initialize missing designated fields in tests/examples - improve OpenSSL compatibility handling in NetClientOpenSSL (version-aware certificate getter and method selection) - add threads linkage in kmipclient CMake for platforms requiring explicit pthread - silence known third-party clang warning in googletest target setup Result: clean warning output in maintainer-mode builds for local project code.
satya-bodapati
requested changes
May 20, 2026
| #define KMIPCLIENT_VERSION_MINOR 2 | ||
| /** @brief kmipclient semantic version patch component. */ | ||
| #define KMIPCLIENT_VERSION_PATCH 1 | ||
| #define KMIPCLIENT_VERSION_PATCH 3 |
There was a problem hiding this comment.
why the jump from 1 to 3? skipping 2
|
|
||
| KmipClient::KmipClient( | ||
| NetClient &net_client, | ||
| NetClient &transport, |
There was a problem hiding this comment.
This seems to be just name change? was there a conflict with the variable name? net_client used elsewehre?
| SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); | ||
| BIO_set_conn_hostname(new_bio.get(), m_host.c_str()); | ||
| BIO_set_conn_port(new_bio.get(), m_port.c_str()); | ||
| BIO_set_conn_hostname(new_bio.get(), m_host.data()); |
There was a problem hiding this comment.
how does it know to use how many bytes without explicit length being passed?
Comment on lines
-270
to
273
| assert(first_id == 1); | ||
| assert(second_id == 2); | ||
| assert(first_id != second_id); | ||
| req.add_batch_item(item2); | ||
|
|
There was a problem hiding this comment.
where are these assertions now?
| bool threw = false; | ||
| try { | ||
| (void) ResponseMessage::fromElement(response_message); | ||
| assert(false); |
There was a problem hiding this comment.
why do we place a dummy assert() block all over? in try blocks?
Comment on lines
+24
to
+63
| if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
| target_compile_options( | ||
| ${target_name} | ||
| PRIVATE | ||
| -Weverything | ||
| -Wno-c++98-compat | ||
| -Wno-c++98-compat-pedantic | ||
| -Wno-pre-c++20-compat | ||
| -Wno-c++20-compat | ||
| -Wno-padded | ||
| -Wno-switch-enum | ||
| -Wno-unsafe-buffer-usage | ||
| -Wno-covered-switch-default | ||
| -Wno-documentation | ||
| -Wno-exit-time-destructors | ||
| -Wno-global-constructors | ||
| -Wno-missing-prototypes | ||
| -Wno-newline-eof | ||
| -Wno-nrvo | ||
| -Wno-weak-vtables | ||
| ) | ||
| elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
| target_compile_options( | ||
| ${target_name} | ||
| PRIVATE | ||
| -Wall | ||
| -Wextra | ||
| -Wpedantic | ||
| -Wcast-qual | ||
| -Wconversion | ||
| -Wdouble-promotion | ||
| -Wformat=2 | ||
| -Wnull-dereference | ||
| -Woverloaded-virtual | ||
| -Wshadow | ||
| -Wsign-conversion | ||
| -Wundef | ||
| -Wuseless-cast | ||
| ) | ||
| endif() |
There was a problem hiding this comment.
WHy do we need these special blocks? I dont see such things in PS code or anywhere?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix compiler warnings in kmipcore/kmipclient and tighten maintainer warning mode
https://perconadev.atlassian.net/browse/PS-10045
Result: clean warning output in maintainer-mode builds for local project code.