Skip to content
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

USB: Do not try to print NULL format strings for verbose trace messages when disabled #2383

Merged
merged 1 commit into from Nov 23, 2020

Conversation

btashton
Copy link
Contributor

Summary

Right now if usb tracing is enabled but verbose is disabled a debug assert will be triggered when ever a verbose trace point is hit because the return format pointer would be NULL (by design). Instead of trying to print the NULL message, just return early. This does not change any normal functionality.

Impact

USB tracing can be enabled in non-verbose mode with debug asserts on.

Testing

nucleo-h745iz:otg_fs_host with debug asserts enabled and trace on. Prior this change it would hit the assert right away.

Right now if usb tracing is enabled but verbose is disabled
a debug assert will be triggered when ever a verbose trace point
is hit.  Instead of trying to print the NULL message, just return
early.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 3ebcd04 into apache:master Nov 23, 2020
@btashton btashton deleted the usbtrace branch December 30, 2020 01:08
@btashton btashton added this to To-Add in Release Notes - 10.1.0 Apr 12, 2021
@jerpelea jerpelea moved this from To-Add to Minor in Release Notes - 10.1.0 Apr 12, 2021
@jerpelea jerpelea moved this from Minor to Added in Release Notes - 10.1.0 Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants