Use (void*)NULL instead of NULL in varargs.
This commit is contained in:
parent
05d2e13e6d
commit
5ff33a73d8
5 changed files with 7 additions and 7 deletions
|
@ -113,7 +113,7 @@ copy(void *ptr)
|
|||
CFWArray *new;
|
||||
size_t i;
|
||||
|
||||
if ((new = cfw_new(cfw_array, NULL)) == NULL)
|
||||
if ((new = cfw_new(cfw_array, (void*)NULL)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((new->data = malloc(sizeof(void*) * array->size)) == NULL) {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
typedef struct CFWClass {
|
||||
const char *name;
|
||||
size_t size;
|
||||
bool (*ctor)(void*, va_list args);
|
||||
bool (*ctor)(void*, va_list);
|
||||
void (*dtor)(void*);
|
||||
bool (*equal)(void*, void*);
|
||||
uint32_t (*hash)(void*);
|
||||
|
|
|
@ -126,7 +126,7 @@ copy(void *ptr)
|
|||
CFWMap *new;
|
||||
uint32_t i;
|
||||
|
||||
if ((new = cfw_new(cfw_map, NULL)) == NULL)
|
||||
if ((new = cfw_new(cfw_map, (void*)NULL)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((new->data = malloc(sizeof(*new->data) * map->size)) == NULL)
|
||||
|
|
|
@ -113,7 +113,7 @@ cfw_stream_read_line(void *ptr)
|
|||
if (ret_str == NULL)
|
||||
return NULL;
|
||||
|
||||
ret = cfw_create(cfw_string, NULL);
|
||||
ret = cfw_create(cfw_string, (void*)NULL);
|
||||
if (ret == NULL) {
|
||||
free(ret_str);
|
||||
return NULL;
|
||||
|
@ -159,7 +159,7 @@ cfw_stream_read_line(void *ptr)
|
|||
if (ret_str == NULL)
|
||||
return NULL;
|
||||
|
||||
ret = cfw_create(cfw_string, NULL);
|
||||
ret = cfw_create(cfw_string, (void*)NULL);
|
||||
if (ret == NULL) {
|
||||
free(ret_str);
|
||||
return NULL;
|
||||
|
@ -199,7 +199,7 @@ cfw_stream_read_line(void *ptr)
|
|||
ret_len--;
|
||||
ret_str[ret_len] = '\0';
|
||||
|
||||
ret = cfw_create(cfw_string, NULL);
|
||||
ret = cfw_create(cfw_string, (void*)NULL);
|
||||
if (ret == NULL) {
|
||||
free(buf);
|
||||
free(ret_str);
|
||||
|
|
|
@ -154,7 +154,7 @@ copy(void *ptr)
|
|||
CFWString *str = ptr;
|
||||
CFWString *new;
|
||||
|
||||
if ((new = cfw_new(cfw_string, NULL)) == NULL)
|
||||
if ((new = cfw_new(cfw_string, (void*)NULL)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((new->data = malloc(str->len + 1)) == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue