Skip to content

Commit 9dae9f5

Browse files
committed
Merge bitcoin/bitcoin#25292: Add LogPrintLevel to lint-format-strings, drop LogPrint-vs-LogPrintf section in dev notes
433b525 Add LogPrintLevel to lint-format-strings, drop LogPrint-vs-LogPrintf section in dev notes (Jon Atack) Pull request description: added by #7003 in 2015, as that potential issue would now be caught by the `test/lint/lint-format-strings.py` script run by the CI. ACKs for top commit: MarcoFalke: cr ACK 433b525 w0xlt: ACK bitcoin/bitcoin@433b525 Tree-SHA512: 91a2ac76689ed4f1f638e07c16d2ec8952fb013cc8bb896780fbd9333abd084281ce99afdc9de715d07a9abb4dce5dd67edf5e347aff466c6ef339ccc4158679
2 parents 79cabe3 + 433b525 commit 9dae9f5

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

doc/developer-notes.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -831,11 +831,6 @@ int GetInt(Tabs tab)
831831
Strings and formatting
832832
------------------------
833833
834-
- Be careful of `LogPrint` versus `LogPrintf`. `LogPrint` takes a `category` argument, `LogPrintf` does not.
835-
836-
- *Rationale*: Confusion of these can result in runtime exceptions due to
837-
formatting mismatch, and it is easy to get wrong because of subtly similar naming.
838-
839834
- Use `std::string`, avoid C string manipulation functions.
840835
841836
- *Rationale*: C++ string handling is marginally safer, less scope for

test/lint/lint-format-strings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'LogConnectFailure,1',
2323
'LogPrint,1',
2424
'LogPrintf,0',
25+
'LogPrintLevel,2',
2526
'printf,0',
2627
'snprintf,2',
2728
'sprintf,1',

0 commit comments

Comments
 (0)