-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
ICU-22377 Fix errors found by gcc -fanalyzer #2446
Conversation
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
I suggest that you put both of the missing Then I also suggest that you don't touch the See the commit that I just added to this PR, you can squash that together with your commit. |
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
I reviewed the commit, and while I was reviewing I was reminded that the C standard says "Each invocation of the va_start and va_copy macros shall be matched by a corresponding invocation of the va_end macro in the same function." Therefore, I redid my commit keeping that rule in mind. This makes for a slightly larger patch as some of the existing va_end() macros had to be moved to comply with the standard.
I have reverted the strncpy() call changes. That said, I ran gcc -fanalzyer over the 73.1 release code and derived my patches from those results and fixed everything I saw in the analyzer output. Assuming I didn't miss anything, the fact that there are additional such warnings means that those additional problematic calls were added post 73.1 release. I personally find that concerning and would strongly recommend a review of all strncpy() calls.
|
Fixes missing call to ‘va_end’ errors. Signed-off-by: Nicholas Vinson <[email protected]>
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Found using gcc -fanalyze.
Code built using the following configure command:
Checklist