gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.17k stars 477 forks source link

Compiler warning in MoonManager.cpp #1669

Closed osrf-migration closed 8 years ago

osrf-migration commented 9 years ago

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Originally posted on ogre forums:

When compiling skyx with clang on Mac OS X, I get a compiler warning about MoonManager.cpp line 225: "explicitly assigning a variable of type 'Ogre::Real' (aka 'float') to itself"

http://build.osrfoundation.org/view/gazebo/job/gazebo-default-devel-homebrew-amd64-2/76/warnings7Result/package.869114785/

Here's a link to the code:

https://github.com/osrf/gazebo/blob/master/gazebo/rendering/skyx/src/MoonManager.cpp#L225

The offending line says:

center = center;

Is that a mistake? Lots of other lines in that functions say:

center = -center;
osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


osrf-migration commented 9 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


It looks like a mistake.

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


It was hard for me to follow the code since there isn't much documentation in the functions, so I didn't want to just change it without knowing what it should be doing.

osrf-migration commented 9 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Yeah, skyx is difficult. You can comment it out and leave a note.

osrf-migration commented 8 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Commented out in pull request #1900

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).