1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00

Silence clang warning about comparing function pointers.

The comparison is used to create a set of function pointers.
This commit is contained in:
Calvin Rose 2021-08-21 12:10:19 -05:00
parent 43a5e12449
commit bd71e1cd02

View File

@ -409,7 +409,7 @@ static void janet_registry_sort(void) {
JanetCFunRegistry reg = janet_vm.registry[i]; JanetCFunRegistry reg = janet_vm.registry[i];
size_t j; size_t j;
for (j = i; j > 0; j--) { for (j = i; j > 0; j--) {
if (janet_vm.registry[j - 1].cfun < reg.cfun) break; if ((void *)(janet_vm.registry[j - 1].cfun) < (void *)(reg.cfun)) break;
janet_vm.registry[j] = janet_vm.registry[j - 1]; janet_vm.registry[j] = janet_vm.registry[j - 1];
} }
janet_vm.registry[j] = reg; janet_vm.registry[j] = reg;
@ -463,7 +463,7 @@ JanetCFunRegistry *janet_registry_get(JanetCFunction key) {
if (mid->cfun == key) { if (mid->cfun == key) {
return mid; return mid;
} }
if (mid->cfun > key) { if ((void *)(mid->cfun) > (void *)(key)) {
hi = mid; hi = mid;
} else { } else {
lo = mid + 1; lo = mid + 1;