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

New compiler warning #109

Closed
dirk-thomas opened this issue Apr 2, 2018 · 4 comments · Fixed by #113
Closed

New compiler warning #109

dirk-thomas opened this issue Apr 2, 2018 · 4 comments · Fixed by #113
Assignees
Labels

Comments

@dirk-thomas
Copy link
Member

As mentioned in ros-visualization/qt_gui_core#114.

E.g. http://build.ros.org/job/Mpr__qt_gui_core__ubuntu_bionic_amd64/1/warnings22Result/

@mikaelarguedas
Copy link
Member

mikaelarguedas commented Apr 3, 2018

It's unclear to me why this shows up on this package. This function should be called transitively by createInstance.

Call stack being:

catkinFindLib
called by getCatkinLibraryPaths (l323)
called by getAllLibraryPathsToTry ('330)
called by getClassLibraryPath (l412)
called by loadLibraryForClass (608)
called by:
  -> createClassInstance (l129)
  -> createInstance (l158)
  -> createUniqueInstance (l190)
  -> createUnmanagedInstance (l229)

I built the melodic version of class_loader, pluginlib, qt_gui_core and rqt_gui with this additional print

Debug output of rosrun rqt_gui rqt_gui:

[DEBUG] [1522718065.187724347]: XML file specifies lookup name (i.e. magic name) = rqt_gui_cpp/RosCppPluginProvider.
[DEBUG] [1522718065.187735353]: Exiting determineAvailableClasses()...
[DEBUG] [1522718065.187742513]: Finished constructring ClassLoader, base = qt_gui_cpp::PluginProvider, address = 0x118eb80
[DEBUG] [1522718065.187829905]: Attempting to create managed instance for class rqt_gui_cpp/RosCppPluginProvider.
[DEBUG] [1522718065.187843431]: Class rqt_gui_cpp/RosCppPluginProvider maps to library lib/librqt_gui_cpp in classes_available_.
[DEBUG] [1522718065.187850493]: this function is actually called

@dirk-thomas can you please do the same experiment on a bionic system and see if that print appears?

@dirk-thomas
Copy link
Member Author

Same here - I don't see any differences.

I would suggest to just move the code from the anonymous catkinFindLib function into the only function calling it, namely getCatkinLibraryPaths. That gets rid of the warning.

(I don't know why the anonymous function was created in the first place in #49 though.)

@dirk-thomas dirk-thomas added the bug label Apr 4, 2018
@dirk-thomas
Copy link
Member Author

@mikaelarguedas How about my proposal from the previous comment?

@mikaelarguedas
Copy link
Member

Yes I had the same idea, originally 👍 , as the function is private I think that's fine to not have it in its' own private namespace. I wanted to have a simple reproducible example to submit to GCC before removing it because that should be reported upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants