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

examples have errant printf parameter usage #259

Closed
diablodale opened this issue Nov 12, 2021 · 0 comments
Closed

examples have errant printf parameter usage #259

diablodale opened this issue Nov 12, 2021 · 0 comments

Comments

@diablodale
Copy link
Contributor

I have so far found 4 instances of improper printf usage in the examples.
Throughout the depthai codebase, there is a often used 32-bit viewpoint. They are exposed when compiling for 64-bit and I can see this in float/int issues and now in printf issues.
I can see you specifically enabled such detection in clang in flags.cmake.
I have found it in MSVC.

Setup

  • depthai-core c1b697a
  • MSVS 2019 Community v16.11.6
  • build= Debug and 64-bit

Repro

  1. cmake config, and build (including examples)
...
..\examples\IMU\imu_gyroscope_accelerometer.cpp(61): warning C4477: 'printf' : format string '%ld' requires an argument of type 'long', but variadic argument 1 has type '__int64'
..\examples\IMU\imu_gyroscope_accelerometer.cpp(63): warning C4477: 'printf' : format string '%ld' requires an argument of type 'long', but variadic argument 1 has type '__int64'
..\examples\IMU\imu_rotation_vector.cpp(48): warning C4477: 'printf' : format string '%ld' requires an argument of type 'long', but variadic argument 1 has type '__int64'
..\examples\MobileNet\webcam_mobilenet_example.cpp(111): warning C4477: 'printf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'unsigned __int64'
...
diablodale added a commit to diablodale/depthai-core that referenced this issue Nov 17, 2021
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

No branches or pull requests

1 participant