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

Use snprintf over sprintf #21583

Merged
merged 8 commits into from
May 22, 2023
Merged

Use snprintf over sprintf #21583

merged 8 commits into from
May 22, 2023

Conversation

patrickelectric
Copy link
Contributor

@patrickelectric patrickelectric commented May 12, 2023

The sprintf is deprecated and has been replaced with snprintf, a warning shows when using "Apple clang version 14.0.0 (clang-1400.0.29.202)".

Allow compiling px4_sitl under M1 with MacOS 13.2

@SalimTerryLi
Copy link
Contributor

Hi,

Did you came across failures other than sprintf? I also need to change those things to fix the build

https://github.com/PX4/PX4-Autopilot/pull/21587/files#diff-237cdc5a5dde6db695c14e439074379fd0ffd18b57566d47669b15da385632cbR53

@julianoes julianoes requested a review from bkueng May 17, 2023 02:11
julianoes
julianoes previously approved these changes May 17, 2023
platforms/common/px4_log.cpp Outdated Show resolved Hide resolved
platforms/common/px4_log.cpp Outdated Show resolved Hide resolved
@patrickelectric
Copy link
Contributor Author

patrickelectric commented May 20, 2023

Hi,

Did you came across failures other than sprintf? I also need to change those things to fix the build

https://github.com/PX4/PX4-Autopilot/pull/21587/files#diff-237cdc5a5dde6db695c14e439074379fd0ffd18b57566d47669b15da385632cbR53

I can run SITL on my mac without problems with the current changes.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@bkueng bkueng merged commit 8feb662 into PX4:main May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants