From f8a18df1c4a2135587f73fd7d6a7ff7a790e008e Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 10 Oct 2018 00:03:37 -0700 Subject: [PATCH] SCP: Cleanup compiler warnings --- sim_console.c | 2 +- sim_fio.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sim_console.c b/sim_console.c index 0c8e029e..97da9a16 100644 --- a/sim_console.c +++ b/sim_console.c @@ -2284,7 +2284,7 @@ if (sim_deb_switches & SWMASK ('N')) if (sim_deb_switches & SWMASK ('B')) { sim_deb_buffer_size = (size_t)(1024 * 1024 * buffer_size); - sim_deb_buffer = realloc (sim_deb_buffer, sim_deb_buffer_size); + sim_deb_buffer = (char *)realloc (sim_deb_buffer, sim_deb_buffer_size); sim_debug_buffer_offset = sim_debug_buffer_inuse = 0; memset (sim_deb_buffer, 0, sim_deb_buffer_size); } diff --git a/sim_fio.c b/sim_fio.c index ae03283f..5f13e4b8 100644 --- a/sim_fio.c +++ b/sim_fio.c @@ -773,7 +773,7 @@ if (((*filepath == '\'') || (*filepath == '"')) && (filepath[strlen (filepath) - 1] == *filepath)) { size_t temp_size = 1 + strlen (filepath); - tempfilepath = malloc (temp_size); + tempfilepath = (char *)malloc (temp_size); if (tempfilepath == NULL) return NULL; strlcpy (tempfilepath, 1 + filepath, temp_size); @@ -784,7 +784,7 @@ if ((filepath[1] == ':') || (filepath[0] == '/') || (filepath[0] == '\\')){ tot_len = 1 + strlen (filepath); - fullpath = malloc (tot_len); + fullpath = (char *)malloc (tot_len); if (fullpath == NULL) { free (tempfilepath); return NULL; @@ -800,7 +800,7 @@ else { return NULL; } tot_len = 1 + strlen (filepath) + 1 + strlen (dir); - fullpath = malloc (tot_len); + fullpath = (char *)malloc (tot_len); if (fullpath == NULL) { free (tempfilepath); return NULL; @@ -854,7 +854,7 @@ for (p = parts; *p; p++) { break; } } -result = malloc (1 + tot_size); +result = (char *)malloc (1 + tot_size); *result = '\0'; if (*parts == '\0') /* empty part specifier means strip only quotes */ strlcat (result, filepath, 1 + tot_size);