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

Remove compiler warning when U_CX_PORT_PRINTF is defined as nothing. #15

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

RobMeades
Copy link
Contributor

@RobMeades RobMeades commented Mar 23, 2024

Hi Andreas: just a little tidy up. There may be other ways of doing this, feel free to suggest.

When using uxclient with ubxlib we define U_CX_AT_CONFIG_FILE in order to use our own configuration file. When ubxlib is configured to have no logging at compile-time, so U_CX_PORT_PRINTF is defined to be empty, we get a compiler warning from uCxLogPrintTime() because the stack variables in that function are no longer used. This PR makes the whole of the body of uCxLogPrintTime() conditional on U_CX_PORT_PRINTF being defined as something useful in order to remove the warning.

@RobMeades RobMeades requested a review from antevir March 23, 2024 13:40
@RobMeades RobMeades changed the title Remove compiler warning when U_CX_PORT_PRINTF is note defined. Remove compiler warning when U_CX_PORT_PRINTF is not defined. Mar 23, 2024
@RobMeades RobMeades changed the title Remove compiler warning when U_CX_PORT_PRINTF is not defined. Remove compiler warning when U_CX_PORT_PRINTF is defined as nothing. Mar 23, 2024
When using uxclient with ubxlib we define U_CX_AT_CONFIG_FILE in order to use our own configuration file. When ubxlib is configured to have no logging at compile-time, so U_CX_PORT_PRINTF is defined to be empty, we get a compiler warning from uCxLogPrintTime() because the stack variables in that function are no longer used. This PR makes the whole of the body of uCxLogPrintTime() conditional on U_CX_PORT_PRINTF being defined in order to remove the warning.
@RobMeades RobMeades force-pushed the fix_warning_no_logging_rmea branch from f628db3 to f2f51e9 Compare March 23, 2024 14:54
@antevir
Copy link
Collaborator

antevir commented Mar 24, 2024

Thanks for fixing Rob!
Don't mind the failing checks - it's just the unit test parser that fails to access the results from a forked PR (will need to find a workaround for it).
Have a nice Sunday!

@antevir antevir merged commit 508768f into u-blox:master Mar 24, 2024
1 of 3 checks passed
@RobMeades RobMeades deleted the fix_warning_no_logging_rmea branch March 24, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants