These are the only remaining uses of snprintf
in our project, and they can cause unexpected issues – for example, see #27014. Change them to use our ToString
(which uses a locale-independent version of std::to_string
) to convert an int
to std::string
. Also remove resulting unused parts of StringContentsSerializer
.
test: Remove last uses of snprintf and simplify #27036
pull john-moffett wants to merge 1 commits into bitcoin:master from john-moffett:2023_02_FixDBWrapperTest changing 2 files +14 −30-
john-moffett commented at 4:48 pm on February 3, 2023: contributor
-
DrahtBot commented at 4:48 pm on February 3, 2023: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
-
DrahtBot added the label Tests on Feb 3, 2023
-
Remove use of snprintf and simplify
One test case uses snprintf to convert an int to a string. Change it to use ToString (which uses a locale-independent version of std::to_string). Also remove unnecessary parts of StringContentsSerializer.
-
john-moffett force-pushed on Feb 3, 2023
-
jonatack commented at 6:04 pm on February 3, 2023: contributorConcept ACK. Maybe verify if the linter files need updating (test/lint/lint-locale-dependence.py?)
-
john-moffett commented at 6:07 pm on February 3, 2023: contributor
Maybe verify if the linter files need updating (test/lint/lint-locale-dependence.py?)
Thanks! Pushed that change about a half hour ago. You were too quick 😄
-
brunoerg commented at 8:38 pm on February 3, 2023: contributorConcept ACK
-
maflcko merged this on Feb 6, 2023
-
maflcko closed this on Feb 6, 2023
-
sidhujag referenced this in commit 5dc32bdc36 on Feb 6, 2023
-
fanquake referenced this in commit bc35c4f58c on Feb 17, 2023
-
sidhujag referenced this in commit ef111be3dd on Feb 17, 2023
-
bitcoin locked this on Feb 6, 2024
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 12:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me