Skip to content

Fix warnp strings#535

Merged
cperciva merged 4 commits intomasterfrom
fix-warnp-strings
Dec 20, 2025
Merged

Fix warnp strings#535
cperciva merged 4 commits intomasterfrom
fix-warnp-strings

Conversation

@gperciva
Copy link
Member

No description provided.

@gperciva
Copy link
Member Author

I kept these as separate commits for ease of reviewing, but they should probably be smooshed together in the git history. This can be done in the github interface, or I could rebase them myself.

@cperciva
Copy link
Member

Can you add a few lines to STYLE about this? (Probably not necessary to mention "print the name of the right function", but worth saying "write foo rather than foo()" and "no terminating punctuation or line break".)

@gperciva
Copy link
Member Author

Updated

@cperciva cperciva merged commit 1862f70 into master Dec 20, 2025
2 checks passed
@gperciva gperciva deleted the fix-warnp-strings branch December 20, 2025 20:07
@gperciva
Copy link
Member Author

Oops, there's a few more cases. STYLE now says "no terminating punctuation", but:

$ git grep "warn" | grep -e "?\"" -e "\!\""
crypto/crypto_dh.c:		warn0("Exponent result too large!");
http/http.c:		warn0("HTTP response with major version > 1!");
tests/aws/main.c:		warn0("That should have failed!");
util/entropy.c:			warn0("EOF on /dev/urandom?");

Arguably these case are unusual enough to warrant punctuation, in which case I should modify STYLE.

@cperciva
Copy link
Member

Yeah I think those cases deserve their punctuation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants