eProsima / Fast-DDS-Gen

Fast-DDS IDL code generator tool. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
77 stars 59 forks source link

Generated xxxCdrAux.hpp has data type casting issue for large recursive data structure #278

Open rookybird opened 6 months ago

rookybird commented 6 months ago

Hi all, I am using fastddsgen v3.1.0. When I compiled the generated xxxCdrAux.hpp, there was an narrowing conversion error "_error: narrowing conversion of ‘12144122424’ from ‘long unsigned int’ to ‘uint32t’ {aka ‘unsigned int’} [-Wnarrowing]".

I used recursive sequence in the idl.

typedef sequence<WaypointNode, 100> SingleLane; typedef sequence<SingleLane, 100> SingleChannel; sequence<SingleChannel, 100> route

The structure has to be this big. Any thoughts to fix the error?

I will attach the idl files below. idl.zip