Skip to content

Commit 9973e7c

Browse files
mergify[bot]fmauch
andauthored
Silence a compilation warning (#425) (#427)
Since setting the receive timeout takes the time_buffer as an argument this raises a "may be used uninitialized" warning. Setting this to 0 explicitly should prevent that. (cherry picked from commit 181902d) Co-authored-by: Felix Exner <[email protected]>
1 parent 41e3e2c commit 9973e7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ur_robot_driver/src/dashboard_client_ros.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ bool DashboardClientROS::connect()
264264
{
265265
timeval tv;
266266
// Timeout after which a call to the dashboard server will be considered failure if no answer has been received.
267-
double time_buffer;
267+
double time_buffer = 0;
268268
node_->get_parameter("receive_timeout", time_buffer);
269269
tv.tv_sec = time_buffer;
270270
tv.tv_usec = 0;

0 commit comments

Comments
 (0)