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

👩‍🌾 Clear all Windows warnings #206

Merged
merged 17 commits into from
Jan 27, 2021

Conversation

chapulina
Copy link
Contributor

@chapulina chapulina commented Jan 22, 2021

It was about time! 8k warnings gone!

The warnings follow these general categories:

  • Warnings from Ogre 1 / 2 source code
  • C4251: the good old "missing DLL interfaces". I started suppressing them one by one but eventually gave in to the blanket suppression in CMakeLists. This alone corresponds to 95% of all warnings!
  • Type conversion warnings
  • A couple of discarding return value of function with 'nodiscard' attribute - one of which was actually a bug (this->ogreMaterial == nullptr;)
  • C4275: ⚠️ I'm not sure that suppressing this one is a final solution, I think that Ogre::MaterialManager::Listener should be in the dll interface like all other classes we're inheriting from.
  • inconsistent dll linkage for BaseDepthCamera - removed the visibility since it's a header-only class and shouldn't need it
  • ⚠️ : the OgreSelectionBufferPrivate class was declared as struct but defined as class. I'm not sure if fixing this doesn't break ABI.
  • There were a few GCC pragmas that Windows could still see and didn't like them
  • Windows wasn't liking some of our preprocessor directives (unexpected tokens following preprocessor directive - expected a newline), so I changed them until it was satisfied

Unfortunately, CI isn't blue yet because of #201 😢 I added some nullptr checks to see if that would be improved with no luck...

Test build before PR with no warnings: https://build.osrfoundation.org/job/ign_rendering-pr-win/1175/


https://github.com/osrf/buildfarmer/issues/145

Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
@chapulina chapulina added tests Broken or missing tests / testing infra Windows Windows support labels Jan 22, 2021
@chapulina chapulina self-assigned this Jan 22, 2021
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Jan 22, 2021
@codecov
Copy link

codecov bot commented Jan 23, 2021

Codecov Report

Merging #206 (cd6e89f) into ign-rendering3 (2d8283c) will decrease coverage by 0.09%.
The diff coverage is 14.28%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           ign-rendering3     #206      +/-   ##
==================================================
- Coverage           50.45%   50.35%   -0.10%     
==================================================
  Files                 129      129              
  Lines               11754    11782      +28     
==================================================
+ Hits                 5930     5933       +3     
- Misses               5824     5849      +25     
Impacted Files Coverage Δ
include/ignition/rendering/RayQuery.hh 100.00% <ø> (ø)
include/ignition/rendering/RenderPassSystem.hh 100.00% <ø> (ø)
include/ignition/rendering/base/BaseCamera.hh 70.27% <ø> (ø)
include/ignition/rendering/base/BaseDepthCamera.hh 16.66% <ø> (ø)
include/ignition/rendering/base/BaseMarker.hh 43.24% <ø> (ø)
include/ignition/rendering/base/BaseScene.hh 0.00% <ø> (ø)
...clude/ignition/rendering/base/BaseThermalCamera.hh 94.44% <ø> (ø)
...nclude/ignition/rendering/ogre/OgreRenderEngine.hh 100.00% <ø> (ø)
ogre/src/OgreDepthCamera.cc 0.00% <0.00%> (ø)
ogre/src/OgreGpuRays.cc 0.00% <0.00%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d8283c...cd6e89f. Read the comment docs.

@chapulina
Copy link
Contributor Author

Oh look at that, a ✔️ on Windows 😱

@@ -380,7 +380,7 @@ void OgreMovableText::SetFontNameImpl(const std::string &_newFontName)
#if OGRE_VERSION_LT_1_10_1
this->ogreMaterial.setNull();
#else
this->ogreMaterial == nullptr;
this->ogreMaterial = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh .. this one was important

Copy link
Contributor

@j-rivero j-rivero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy cow @chapulina , I take my hat off 🎩 . I think that there is valuable information about how to solve the different Windows warnings in changes in this PR and the description. At least mentioning it in the weekly meeting could be a good idea.

@chapulina
Copy link
Contributor Author

At least mentioning it in the weekly meeting could be a good idea.

Cool, I added an item for us not to forget 🎉

@chapulina chapulina merged commit 64714e5 into ign-rendering3 Jan 27, 2021
@chapulina chapulina deleted the chapulina/3/win_warnings branch January 27, 2021 19:38
@@ -28,10 +37,10 @@ set_property(
target_link_libraries(${ogre_target}
PUBLIC
${ignition-common${IGN_COMMON_VER}_LIBRARIES}
IgnOGRE::IgnOGRE
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this broke downstream libraries like ign-gui:

CMake Error at src/plugins/CMakeLists.txt:29 (add_library):
  Target "Grid3D" links to target "IgnOGRE::IgnOGRE" but the target was not               
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?       
Call Stack (most recent call first): 
  src/plugins/CMakeLists.txt:77 (ign_gui_add_library)
  src/plugins/grid_3d/CMakeLists.txt:1 (ign_gui_add_plugin)
                                    
                                     
CMake Error at src/plugins/CMakeLists.txt:29 (add_library):
  Target "Scene3D" links to target "IgnOGRE::IgnOGRE" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?            
Call Stack (most recent call first):  
  src/plugins/CMakeLists.txt:77 (ign_gui_add_library)
  src/plugins/scene3d/CMakeLists.txt:1 (ign_gui_add_plugin)  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel tests Broken or missing tests / testing infra Windows Windows support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants