Cast uses of return_*(), nop() and enumerator_create_empty()
As described in the previous commit, GCC 15 uses C23 by default and that changes the meaning of such argument-less function declarations. So whenever we assign such a function to a pointer that expects a function with arguments it causes an incompatible pointer type warning. We could define dedicated functions/callbacks whenever necessary, but this seems like the simpler approach for now (especially since most uses of these functions have already been cast).
This commit is contained in:
@@ -1625,7 +1625,7 @@ static private_identification_t *identification_create(id_type_t type)
|
||||
this->public.hash = _hash_binary;
|
||||
this->public.equals = _equals_binary;
|
||||
this->public.matches = _matches_any;
|
||||
this->public.contains_wildcards = return_true;
|
||||
this->public.contains_wildcards = (void*)return_true;
|
||||
break;
|
||||
case ID_FQDN:
|
||||
case ID_RFC822_ADDR:
|
||||
@@ -1660,13 +1660,13 @@ static private_identification_t *identification_create(id_type_t type)
|
||||
this->public.hash = _hash_binary;
|
||||
this->public.equals = _equals_binary;
|
||||
this->public.matches = _matches_range;
|
||||
this->public.contains_wildcards = return_false;
|
||||
this->public.contains_wildcards = (void*)return_false;
|
||||
break;
|
||||
default:
|
||||
this->public.hash = _hash_binary;
|
||||
this->public.equals = _equals_binary;
|
||||
this->public.matches = _matches_binary;
|
||||
this->public.contains_wildcards = return_false;
|
||||
this->public.contains_wildcards = (void*)return_false;
|
||||
break;
|
||||
}
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user