mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-19 23:43:36 +08:00
rtemstoolkit: Various coverity related fixes.
This commit is contained in:
@@ -425,6 +425,7 @@ namespace rld
|
|||||||
archive (false),
|
archive (false),
|
||||||
writable (false),
|
writable (false),
|
||||||
elf_ (0),
|
elf_ (0),
|
||||||
|
mtype (0),
|
||||||
oclass (0),
|
oclass (0),
|
||||||
ident_str (0),
|
ident_str (0),
|
||||||
ident_size (0),
|
ident_size (0),
|
||||||
|
@@ -82,9 +82,15 @@ namespace rld
|
|||||||
}
|
}
|
||||||
|
|
||||||
temporary_files::~temporary_files ()
|
temporary_files::~temporary_files ()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
clean_up ();
|
clean_up ();
|
||||||
}
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const std::string
|
const std::string
|
||||||
temporary_files::get (const std::string& suffix, bool keep)
|
temporary_files::get (const std::string& suffix, bool keep)
|
||||||
@@ -99,6 +105,9 @@ namespace rld
|
|||||||
RLD_PATH_SEPARATOR_STR);
|
RLD_PATH_SEPARATOR_STR);
|
||||||
tempfile_ref ref (name, keep);
|
tempfile_ref ref (name, keep);
|
||||||
tempfiles.push_back (ref);
|
tempfiles.push_back (ref);
|
||||||
|
|
||||||
|
::free (temp);
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,10 +170,16 @@ namespace rld
|
|||||||
}
|
}
|
||||||
|
|
||||||
tempfile::~tempfile ()
|
tempfile::~tempfile ()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
close ();
|
close ();
|
||||||
temporaries.erase (_name);
|
temporaries.erase (_name);
|
||||||
}
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tempfile::open (bool writable)
|
tempfile::open (bool writable)
|
||||||
|
@@ -210,7 +210,6 @@ namespace rld
|
|||||||
if (slash == std::string::npos)
|
if (slash == std::string::npos)
|
||||||
throw rld::error ("Invalid BSP name", _arch_bsp);
|
throw rld::error ("Invalid BSP name", _arch_bsp);
|
||||||
return _arch_bsp.substr (0, slash);
|
return _arch_bsp.substr (0, slash);
|
||||||
std::string bsp = _arch_bsp.substr (slash + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string
|
const std::string
|
||||||
|
Reference in New Issue
Block a user