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:
@@ -191,7 +191,7 @@ METHOD(enumerator_t, enumerate_dns, bool,
|
||||
VA_ARGS_VGET(args, type, data);
|
||||
*type = INTERNAL_IP4_DNS;
|
||||
*data = chunk_empty;
|
||||
this->venumerate = return_false;
|
||||
this->venumerate = (void*)return_false;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ ha_attribute_t *ha_attribute_create(ha_kernel_t *kernel, ha_segments_t *segments
|
||||
.provider = {
|
||||
.acquire_address = _acquire_address,
|
||||
.release_address = _release_address,
|
||||
.create_attribute_enumerator = enumerator_create_empty,
|
||||
.create_attribute_enumerator = (void*)enumerator_create_empty,
|
||||
},
|
||||
.reserve = _reserve,
|
||||
.destroy = _destroy,
|
||||
|
||||
@@ -220,7 +220,7 @@ updown_handler_t *updown_handler_create()
|
||||
.handler = {
|
||||
.handle = _handle,
|
||||
.release = _release,
|
||||
.create_attribute_enumerator = enumerator_create_empty,
|
||||
.create_attribute_enumerator = (void*)enumerator_create_empty,
|
||||
},
|
||||
.create_dns_enumerator = _create_dns_enumerator,
|
||||
.destroy = _destroy,
|
||||
|
||||
Reference in New Issue
Block a user