-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
librealsense-2.40.0/src/media/ros/ros_reader.cpp:514:Wpessimizing-move #10799
Comments
Hi @dcb314 If yourself or another RealSense user develop an edit of the source code that improves performance then you are very welcome to share it as a pull request so that it can be evaluated by the Intel RealSense developer team for inclusion in the RealSense SDK. Thanks! https://github.com/IntelRealSense/librealsense/pulls |
Thanks for your offer. I don't do pull requests. There were a bunch more of the same warning in the package.
Column 1 is a count of the number of times the warning occurred in the build. |
This warning has never been previously reported by librealsense users. Have you experienced it in earlier gcc versions? |
The warning has recently been enhanced in development versions of gcc. The most recently released version of gcc (12.2) might produce some of these warnings. |
Let's keep this case open and see whether anybody else reports a similar problem in future with recent development versions of gcc. Thanks very much for the report! |
Recent development versions of gcc can be made to say:
/home/dcb36/rpmbuild/BUILD/librealsense-2.40.0/src/media/ros/ros_reader.cpp:514:25: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Source code is
I think some code rework would make it run faster.
The text was updated successfully, but these errors were encountered: