prevent MINGW compiler warnings
This commit is contained in:
parent
beb27f27a6
commit
3c2bece87f
|
|
@ -1220,11 +1220,11 @@ static char *value_to_str(Data_Type_t type, Value_t value)
|
|||
/* be careful, the string could conceivably be very long... */
|
||||
str_len = (int) strlen(value.svalue);
|
||||
if ((str_len + BASE_STR_LEN) > max_len) {
|
||||
size_t n_byte_alloc = max_len + str_len + 1;
|
||||
int n_byte_alloc = max_len + str_len + 1;
|
||||
void * const p = realloc(str, n_byte_alloc);
|
||||
if (p == NULL) {
|
||||
(void) fprintf(stderr, "Unable to resize string "
|
||||
"buffer to size %zu.\n",
|
||||
(void) fprintf(stderr,
|
||||
"Unable to resize string buffer to size %d.\n",
|
||||
n_byte_alloc);
|
||||
free(str);
|
||||
return (char *) NULL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue