Compile error in release build type #23

Closed
opened 2020-01-03 10:06:14 +01:00 by KangJH · 1 comment
KangJH commented 2020-01-03 10:06:14 +01:00 (Migrated from github.com)

Hi Livox team,
I'm one of members in Seoul Robotics.
I'm facing a compile error while building Livox-SDK with my script.
Below is error message.

Livox-SDK/sdk_core/src/base/io_loop.cpp:85:19: error: unused variable ‘thread_id’ [-Werror=unused-variable]
   apr_os_thread_t thread_id = apr_os_thread_current();

I'm thinking the problem occures because I'm using "cmake .. -DCMAKE_BUILD_TYPE=Release" in my script. This makes the compiler ignore assert() syntax.
Could you simply add (void)thread_id in IOLoop::RemoveDelegateSync to avoid compile error in case someone using Release build?

Hi Livox team, I'm one of members in Seoul Robotics. I'm facing a compile error while building Livox-SDK with my script. Below is error message. ``` Livox-SDK/sdk_core/src/base/io_loop.cpp:85:19: error: unused variable ‘thread_id’ [-Werror=unused-variable] apr_os_thread_t thread_id = apr_os_thread_current(); ``` I'm thinking the problem occures because I'm using "**cmake .. -DCMAKE_BUILD_TYPE=Release**" in my script. This makes the compiler ignore assert() syntax. Could you simply add **(void)thread_id** in _IOLoop::RemoveDelegateSync_ to avoid compile error in case someone using Release build?
Livox-SDK commented 2020-01-06 03:50:09 +01:00 (Migrated from github.com)

Thank you for your advice, we will fix this bug in next release.

Thank you for your advice, we will fix this bug in next release.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmr/Livox-SDK#23