SCP: Cleanup compiler warnings
This commit is contained in:
parent
6e65b635e3
commit
f8a18df1c4
2 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue