Skip to content

fix cmake build warnings - #242

Open
jiuker wants to merge 1 commit into
minio:mainfrom
jiuker:fix-issue-130
Open

fix cmake build warnings#242
jiuker wants to merge 1 commit into
minio:mainfrom
jiuker:fix-issue-130

Conversation

@jiuker

@jiuker jiuker commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

fix warnings
fix #130
now:

cmake --build /home/jiuker/GolandProjects/minio-cpp/build --target tests
[  6%] Building CXX object CMakeFiles/miniocpp.dir/src/args.cc.o
[ 13%] Building CXX object CMakeFiles/miniocpp.dir/src/baseclient.cc.o
[ 20%] Building CXX object CMakeFiles/miniocpp.dir/src/client.cc.o
[ 26%] Building CXX object CMakeFiles/miniocpp.dir/src/credentials.cc.o
[ 26%] Building CXX object CMakeFiles/miniocpp.dir/src/error.cc.o
[ 33%] Building CXX object CMakeFiles/miniocpp.dir/src/http.cc.o
[ 40%] Building CXX object CMakeFiles/miniocpp.dir/src/providers.cc.o
[ 46%] Building CXX object CMakeFiles/miniocpp.dir/src/request.cc.o
[ 53%] Building CXX object CMakeFiles/miniocpp.dir/src/response.cc.o
[ 60%] Building CXX object CMakeFiles/miniocpp.dir/src/select.cc.o
[ 60%] Building CXX object CMakeFiles/miniocpp.dir/src/signer.cc.o
[ 66%] Building CXX object CMakeFiles/miniocpp.dir/src/sse.cc.o
[ 73%] Building CXX object CMakeFiles/miniocpp.dir/src/types.cc.o
[ 80%] Building CXX object CMakeFiles/miniocpp.dir/src/utils.cc.o
[ 86%] Linking CXX static library libminiocpp.a
[ 86%] Built target miniocpp
[ 93%] Building CXX object CMakeFiles/tests.dir/tests/tests.cc.o
[100%] Linking CXX executable tests
[100%] Built target tests

Summary by CodeRabbit

  • Bug Fixes
    • Improved multipart-upload cleanup by detecting failures and recording warning messages.
    • Improved asynchronous cleanup handling by reporting failed bucket-removal operations.
  • Refactor
    • Removed unused parameter names from internal error-handling declarations.

fix warnings
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The changes remove unused parameter names and add warning logs when multipart-upload or test bucket cleanup operations fail.

Changes

Error handling and cleanup diagnostics

Layer / File(s) Summary
Remove unused parameter names
src/baseclient.cc, src/client.cc
Unused parameter names were removed from error-handling definitions without changing their signatures or behavior.
Report multipart abort failures
src/client.cc
Multipart cleanup now checks AbortMultipartUpload results and logs returned errors.
Report test bucket cleanup failures
tests/tests.cc
Asynchronous test cleanup now checks RemoveBucket results and logs failures.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: harshavardhana

Poem

A rabbit checks each cleanup trail,
And logs the errors when they fail.
Unused names now hop away,
Multipart paths speak what they say.
Buckets leave a warning bright.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes do not resolve the signedness conversions listed in issue #130; they address unused parameters and cleanup-result handling instead. Implement the conversions listed in issue #130, or link the issue that covers the warning fixes made by this pull request.
Out of Scope Changes check ⚠️ Warning Multipart cleanup logging and asynchronous test cleanup changes are not related to the implicit conversion warnings in issue #130. Remove these cleanup behavior changes or move them to a separate pull request with a relevant issue.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary goal of resolving CMake build warnings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/client.cc (1)

1308-1311: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Avoid duplicate cleanup warnings.

At Line [1308], cleanup() runs before several failure paths throw. The catch block then runs cleanup() again. The second pass can remove already deleted buckets and log ResourceNotFound warnings as cleanup failures.

Run cleanup only from the catch block, or make the helper suppress expected not-found results.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/client.cc` around lines 1308 - 1311, Update the PutObject
failure-handling flow around BaseClient::PutObject so cleanup is performed only
once: remove the pre-throw cleanup invocation and retain cleanup in the catch
path, or make cleanup ignore expected not-found results. Preserve normal cleanup
behavior while preventing duplicate ResourceNotFound warnings.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/client.cc`:
- Around line 1308-1311: Update the PutObject failure-handling flow around
BaseClient::PutObject so cleanup is performed only once: remove the pre-throw
cleanup invocation and retain cleanup in the catch path, or make cleanup ignore
expected not-found results. Preserve normal cleanup behavior while preventing
duplicate ResourceNotFound warnings.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eb1fc58f-0780-430e-b1bc-6eb8acb8c212

📥 Commits

Reviewing files that changed from the base of the PR and between 5590ba7 and 1133987.

📒 Files selected for processing (3)
  • src/baseclient.cc
  • src/client.cc
  • tests/tests.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implicit conversion warnings

1 participant