Skip to content

Commit

Permalink
merge bitcoin#25292: Add LogPrintLevel to lint-format-strings, drop L…
Browse files Browse the repository at this point in the history
…ogPrint-vs-LogPrintf section in dev notes
  • Loading branch information
kwvg committed Nov 20, 2024
1 parent 37ab275 commit 32f9a03
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -862,11 +862,6 @@ int GetInt(Tabs tab)
Strings and formatting
------------------------
- Be careful of `LogPrint` versus `LogPrintf`. `LogPrint` takes a `category` argument, `LogPrintf` does not.
- *Rationale*: Confusion of these can result in runtime exceptions due to
formatting mismatch, and it is easy to get wrong because of subtly similar naming.
- Use `std::string`, avoid C string manipulation functions.
- *Rationale*: C++ string handling is marginally safer, less scope for
Expand Down
1 change: 1 addition & 0 deletions test/lint/lint-format-strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS=(
"LogConnectFailure,1"
"LogPrint,1"
"LogPrintf,0"
"LogPrintLevel,2"
"printf,0"
"snprintf,2"
"sprintf,1"
Expand Down

0 comments on commit 32f9a03

Please sign in to comment.