Fix gcc warnings in ndmjob program#1343
Conversation
arogge
left a comment
There was a problem hiding this comment.
Hi!
thank you very much for taking the time to fix this. The ndmjob program is largely unmaintained, so it doesn't get much attention.
The [[maybe_unused]] attributes are pretty obvious. Your (ssize_t) cast looks wrong: you need to cast the return value check instead of the parameter passed to write().
You can also remove your changelog record and rename the PR accordingly, the changelog will be now be updated a merge-time using the PR title so you don't have to take care of that anymore.
|
I just tried to build it and realized NDMP is built with a plain C compiler, so At least that seems to build fine for me. Also, with our default warning levels I didn't get a warning/problem when comparing the |
|
I have modify it, please take an look again for it. |
|
Still doesn't build on my machine: |
|
Do you want to clean up the commits or should I do it? |
|
What do you mean with clean up? |
|
In this case probably merging all the commits into one. We usually try to have a "clean" git history (i.e. what it would have looked like if you got it 100% correct on the first try), because that is easier to understand for people who work through the git log in the future. |
|
Ah, I understood. But how can I do this here? |
|
I don't think that's possible in Github. I always use |
|
But as I wrote - I can also do that, if you want. |
|
Ok, then please do it. |
f447e33 to
259055b
Compare
On Fedora 37 the gcc will report many warnings as errors, so the warnings need an fix.
Please check
Your name is present in the AUTHORS file (optional)If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
General
Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.Source code quality
bareos-check-sources --since-mergedoes not report any problems