Menu ▾ ▴

#379 # error: narrowing conversion of ‘x.xx’ from ‘double’ to ‘int’

trunk
open
nobody
None
9
2022-05-01
2022-04-29
No

error: narrowing conversion of ‘x.xx’ from ‘double’ to ‘int’

We are trying to build the project on raspberry pi, we are using python2 as an interpreter.
This is the error that we are facing, could you please help us with, or put us in the right direction maybe?
Thank You

/home/aa/Downloads/player-3.0.2/server/drivers/mixed/p2os/robot_params.cc:448:1: error: narrowing conversion of ‘6.1539999999999995e-1’ from ‘double’ to ‘int’ [-Wnarrowing]
  448 | };
      | ^
/home/aa/Downloads/player-3.0.2/server/drivers/mixed/p2os/robot_params.cc:4925:1: error: narrowing conversion of ‘2.5331999999999999e+0’ from ‘double’ to ‘int’ [-Wnarrowing]
 4925 | };
      | ^
/home/aa/Downloads/player-3.0.2/server/drivers/mixed/p2os/robot_params.cc:5117:1: error: narrowing conversion of ‘2.5331999999999999e+0’ from ‘double’ to ‘int’ [-Wnarrowing]
 5117 | };
      | ^
/home/aa/Downloads/player-3.0.2/server/drivers/mixed/p2os/robot_params.cc:5309:1: error: narrowing conversion of ‘2.5331999999999999e+0’ from ‘double’ to ‘int’ [-Wnarrowing]
 5309 | };
      | ^
/home/aa/Downloads/player-3.0.2/server/drivers/mixed/p2os/robot_params.cc:5934:1: error: narrowing conversion of ‘2.5331999999999999e+0’ from ‘double’ to ‘int’ [-Wnarrowing]
 5934 | };
      | ^
/home/aa/Downloads/player-3.0.2/server/drivers/mixed/p2os/robot_params.cc:6126:1: error: narrowing conversion of ‘2.5331999999999999e+0’ from ‘double’ to ‘int’ [-Wnarrowing]
 6126 | };
      | ^
/home/aa/Downloads/player-3.0.2/server/drivers/mixed/p2os/robot_params.cc:6318:1: error: narrowing conversion of ‘2.5331999999999999e+0’ from ‘double’ to ‘int’ [-Wnarrowing]
 6318 | };
      | ^
gmake[2]: *** [server/libplayerdrivers/CMakeFiles/playerdrivers.dir/build.make:1420: server/libplayerdrivers/CMakeFiles/playerdrivers.dir/__/drivers/mixed/p2os/robot_params.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:3356: server/libplayerdrivers/CMakeFiles/playerdrivers.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

Discussion

  • Jagraj Singh

    Jagraj Singh - 2022-04-29

    [ 40%] Building CXX object server/libplayerdrivers/CMakeFiles/playerdrivers.dir/__/drivers/mixed/p2os/robot_params.o

     

Log in to post a comment.