diff options
author | Chris Johns <chrisj@rtems.org> | 2018-08-06 09:17:36 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-08-07 09:11:29 +1000 |
commit | 058a3a0bd05cebcc0e92d7261c0b1a66c072c6c2 (patch) | |
tree | 1636c0edb6017972d5113d9e0068282a3df7f7af /rtemstoolkit | |
parent | 5d957c9c5140742451111cfcf027c295bdf4cd67 (diff) |
rtemstoolkit: Various coverity related fixes.
Diffstat (limited to 'rtemstoolkit')
-rw-r--r-- | rtemstoolkit/rld-elf.cpp | 1 | ||||
-rw-r--r-- | rtemstoolkit/rld-process.cpp | 21 | ||||
-rw-r--r-- | rtemstoolkit/rld-rtems.cpp | 1 |
3 files changed, 19 insertions, 4 deletions
diff --git a/rtemstoolkit/rld-elf.cpp b/rtemstoolkit/rld-elf.cpp index ace3967..231f2bf 100644 --- a/rtemstoolkit/rld-elf.cpp +++ b/rtemstoolkit/rld-elf.cpp @@ -425,6 +425,7 @@ namespace rld archive (false), writable (false), elf_ (0), + mtype (0), oclass (0), ident_str (0), ident_size (0), diff --git a/rtemstoolkit/rld-process.cpp b/rtemstoolkit/rld-process.cpp index e91796f..30e0605 100644 --- a/rtemstoolkit/rld-process.cpp +++ b/rtemstoolkit/rld-process.cpp @@ -83,7 +83,13 @@ namespace rld temporary_files::~temporary_files () { - clean_up (); + try + { + clean_up (); + } + catch (...) + { + } } const std::string @@ -99,6 +105,9 @@ namespace rld RLD_PATH_SEPARATOR_STR); tempfile_ref ref (name, keep); tempfiles.push_back (ref); + + ::free (temp); + return name; } @@ -162,8 +171,14 @@ namespace rld tempfile::~tempfile () { - close (); - temporaries.erase (_name); + try + { + close (); + temporaries.erase (_name); + } + catch (...) + { + } } void diff --git a/rtemstoolkit/rld-rtems.cpp b/rtemstoolkit/rld-rtems.cpp index 806a2e1..a2dcf82 100644 --- a/rtemstoolkit/rld-rtems.cpp +++ b/rtemstoolkit/rld-rtems.cpp @@ -210,7 +210,6 @@ namespace rld if (slash == std::string::npos) throw rld::error ("Invalid BSP name", _arch_bsp); return _arch_bsp.substr (0, slash); - std::string bsp = _arch_bsp.substr (slash + 1); } const std::string |