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

Fix format specifier #731

Merged
merged 1 commit into from
Apr 15, 2019
Merged

Conversation

garaemon
Copy link
Member

  • Use %u instead of %lu to print Ogre::Texture::getWidth() and
    Ogre::Texture::getHeight() because they return uint32.

https://www.ogre3d.org/docs/api/1.9/class_ogre_1_1_texture.html#a03b77fa04181bc3bd30323555b425667

The following warning will disappear after merging this PR.

/home/ryohei/gitai/catkin_ws/src/jsk_visualization/jsk_rviz_plugins/src/camera_info_display.cpp: In member function ‘virtual void jsk_rviz_plugins::CameraInfoDisplay::drawImageTexture()’:
/home/ryohei/gitai/catkin_ws/src/jsk_visualization/jsk_rviz_plugins/src/camera_info_display.cpp:369:1173: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘Ogre::uint32 {aka unsigned int}’ [-Wformat=]
/home/ryohei/gitai/catkin_ws/src/jsk_visualization/jsk_rviz_plugins/src/camera_info_display.cpp:370:1171: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘Ogre::uint32 {aka unsigned int}’ [-Wformat=]

* Use %u instead of %lu to print Ogre::Texture::getWidth() and
  Ogre::Texture::getHeight() because they return uint32.
@k-okada k-okada merged commit aa6efa2 into jsk-ros-pkg:master Apr 15, 2019
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.

None yet

3 participants