cppcheck highlighted variables that were initialized but then later
reassigned.
Change-Id: Ie12742c01fd3bf48b2d6c05a3b448da91d57a2e4
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
const uintptr_t spec, io_entity_t *entity)
{
int result = -ENOENT;
- long sh_result = -1;
+ long sh_result;
const io_file_spec_t *file_spec = (const io_file_spec_t *)spec;
assert(file_spec != NULL);
size_t *length_read)
{
int result = -ENOENT;
- long sh_result = -1;
+ long sh_result;
size_t bytes = length;
long file_handle;
static int sh_file_write(io_entity_t *entity, const uintptr_t buffer,
size_t length, size_t *length_written)
{
- long sh_result = -1;
+ long sh_result;
long file_handle;
size_t bytes = length;
/* Close a file on the semi-hosting device */
static int sh_file_close(io_entity_t *entity)
{
- long sh_result = -1;
+ long sh_result;
long file_handle;
assert(entity != NULL);
X509_EXTENSION *ex = NULL;
ASN1_INTEGER *counter = NULL;
unsigned char *p = NULL;
- int sz = -1;
+ int sz;
/* Encode counter */
counter = ASN1_INTEGER_new();