-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Bsnprintf() implementation and add format attributes #1697
Draft
arogge
wants to merge
30
commits into
bareos:master
Choose a base branch
from
arogge:dev/arogge/master/replace-bsnprintf
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
sebsura
reviewed
Feb 6, 2024
sebsura
reviewed
Feb 6, 2024
I set this to no build to reduce the strain on jenkins. As soon as we get it to build locally this should be changed back. |
sebsura
force-pushed
the
dev/arogge/master/replace-bsnprintf
branch
2 times, most recently
from
February 9, 2024 12:55
dba59d4
to
5fb5295
Compare
sebsura
force-pushed
the
dev/arogge/master/replace-bsnprintf
branch
5 times, most recently
from
February 21, 2024 13:56
faf3036
to
45ba003
Compare
Replace the existing code with a simple wrapper around the standard library.
The changes to printf lead to slight differences in some output. This patch adapts the existing test to the new outputs.
This will only work for GCC-like compilers, so we will probably need to replace this with a macro for at least MSVC (and maybe also Clang).
Now it compiles for me!
Sadly a lot of our code uses sizeof(constexpr string) to find the size of the string, so we need to leave them as char[].
This format specifier is otherwise unused and is not supported by the normal printf.
sebsura
force-pushed
the
dev/arogge/master/replace-bsnprintf
branch
2 times, most recently
from
February 22, 2024 09:30
db2d385
to
6774b89
Compare
sebsura
force-pushed
the
dev/arogge/master/replace-bsnprintf
branch
from
February 22, 2024 09:52
6774b89
to
bb5cb43
Compare
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.
This PR replaces the implementation of Bvsnprintf() by the plain library functions.
We also add the attributes to all printf()-like functions to be able to detect problems at compile-time instead of crashing at runtime. As this produced a lot of problems, -Werror was disabled for format-related things (but should be re-enabled before this PR is merged).
Please check
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)
Make sure you check/merge the PR using
devtools/pr-tool
to have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests