Skip to content

Commit

Permalink
PR #12210 from OhadMeir: Handle Coverity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir-Az authored Sep 19, 2023
2 parents 49fbd60 + d8d1c78 commit ff38a3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/ds/d400/d400-auto-calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1552,8 +1552,8 @@ namespace librealsense

std::shared_ptr<ds_advanced_mode_base> auto_calibrated::change_preset()
{
preset old_preset_values;
rs2_rs400_visual_preset old_preset;
preset old_preset_values{};
rs2_rs400_visual_preset old_preset = { RS2_RS400_VISUAL_PRESET_DEFAULT };

auto advanced_mode = dynamic_cast<ds_advanced_mode_base*>(this);
if (advanced_mode)
Expand Down Expand Up @@ -1882,7 +1882,7 @@ namespace librealsense
fy = intrin.fy;
}

std::array<float, 4> rec_sides_cur;
std::array< float, 4 > rec_sides_cur{};
rs2_extract_target_dimensions(f, RS2_CALIB_TARGET_ROI_RECT_GAUSSIAN_DOT_VERTICES, rec_sides_cur.data(), 4, &e);
if (e)
throw std::runtime_error("Failed to extract target information\nfrom the captured frames!");
Expand Down
4 changes: 2 additions & 2 deletions src/fw-logs/fw-log-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ namespace librealsense
class fw_log_data
{
public:
fw_log_data(void);
~fw_log_data(void);
fw_log_data();
~fw_log_data();

uint32_t _magic_number;
uint32_t _severity;
Expand Down
2 changes: 1 addition & 1 deletion src/linux/backend-v4l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ namespace librealsense
// Get DFU node for MIPI camera
vfd = open(dfu_device_path.c_str(), O_RDONLY | O_NONBLOCK);

if (vfd > 0) {
if (vfd >= 0) {
::close(vfd); // file exists, close file and continue to assign it
info.dfu_device_path = dfu_device_path;
}
Expand Down

0 comments on commit ff38a3f

Please sign in to comment.