Skip to content

Commit

Permalink
fix coverity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Mar 14, 2024
1 parent 18489a6 commit 436e79b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ HANDLE_EXCEPTIONS_AND_RETURN(nullptr, options, option, value)
static void populate_options_list( rs2_options_list * updated_options_list,
options_watcher::options_and_values const & updated_options )
{
for( auto id_value : updated_options )
for( auto & id_value : updated_options )
{
options_watcher::option_and_value const & option_and_value = id_value.second;
updated_options_list->list.push_back(
Expand Down
2 changes: 1 addition & 1 deletion third-party/realdds/src/dds-option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ bool type_from_value( std::string & type, json const & j, json const & j2, Rest.

static std::string parse_type( json const & j, size_t size, dds_option::option_properties & props )
{
for( auto p : props )
for( auto & p : props )
{
switch( p.length() )
{
Expand Down
5 changes: 5 additions & 0 deletions tools/fw-update/rs-fw-update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,11 @@ try

return EXIT_SUCCESS;
}
catch( const std::exception & e )
{
std::cerr << "-F- Unexpected exception: " << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (const rs2::error & e)
{
std::cerr << "RealSense error calling " << e.get_failed_function() << "(" << e.get_failed_args() << "):\n " << e.what() << std::endl;
Expand Down

0 comments on commit 436e79b

Please sign in to comment.