Repository navigation
Fix uninitialized variable issue - #11440
Conversation
| LOG_ERROR(_ep.get_option_name(_option) << " value is not valid!"); | ||
|
|
||
| return temperature_data.*field; | ||
| float temperature_val = temperature_data.*field; |
There was a problem hiding this comment.
The fix did not solve the error...
May we mark it as not a problem?
There was a problem hiding this comment.
@Nir-Az, please advise if we may mark it like "Not a problem".
I checked via debugger that a value was temperature_val = 37.000000
There was a problem hiding this comment.
Please add the static analysis complaint ..
There was a problem hiding this comment.
return static_cast<float>(temperature_data.*field) ?
There was a problem hiding this comment.
I am not sure this will work but it's worth a shot...
The field value is casted to float anyway but it seems that KW does not interpret .* as dereferencing the pointer-to-member. Maybe an explicit cast will help, but we tried setting that into a value that is returned in a different statement, and it didn't help.
There was a problem hiding this comment.
Please add the static analysis complaint ..
See LRS-670 (number 2 in the description)
There was a problem hiding this comment.
Whatever you think, if you wish to mark as Not a problem, feel free (on master+ development KW projects.
Or maybe the static cast will help
There was a problem hiding this comment.
So @Tamir91, undo the change and mark it as not a problem.
Tracked on [LRS-670]
Tracked on [LRS-671]