ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

should i ignore warnings

asked 2018-03-21 06:47:33 -0600

dinesh gravatar image

Should i ignore all the warnings while building some project in ros and only remove the errors? For example while building a project i get below yellow colourd warnings:

-- Found gmock sources under '/usr/src/gmock': gmock will be built
CMake Warning (dev) at /usr/src/gmock/CMakeLists.txt:40 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
This warning is for project developers.  Use -Wno-dev to suppress it.

    CMake Warning (dev) at /usr/src/gtest/CMakeLists.txt:42 (project):
      Policy CMP0048 is not set: project() command manages VERSION variables.
      Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
      command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
This warning is for project developers.  Use -Wno-dev to suppress it.

Will not this type of warnings create bug latter?

edit retag flag offensive close merge delete

Comments

Similar post

stevejp gravatar image stevejp  ( 2018-03-21 07:06:42 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
4

answered 2018-03-21 21:35:18 -0600

tfoote gravatar image

Warnings are usually there for a reason. You should not just ignore them outright. They usually can mean that you're doing something that might be a problem. They will help you write cleaner code.

This is really a more general topic than ROS so I'd suggest that you look at external resources. Here are a few resources I found quickly:

edit flag offensive delete link more
1

answered 2018-03-21 20:51:46 -0600

JamesGiller gravatar image

It is good practice to deal with all warnings and end up with a squeaky clean build. Sometimes warnings like for a "narrowing conversion" may indicate bugs in your code. The warnings you specify here seem to be benign and you can suppress them by adding -Wno-dev to your build flags as the message says.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-03-21 06:47:33 -0600

Seen: 1,771 times

Last updated: Mar 21 '18