The official build runs with gcc which checks for some incompatible
pointers for assignment of const to non-const, whereas clang
build disabled such warnings.
So, update to re-enable the check on clang and fixup couple of
locations that failed.
ifeq ($(COMPILER), clang)
CFLAGS += -Wno-microsoft -Qunused-arguments -Wno-unused-function
CFLAGS += -Wno-unused-value -Wno-tautological-constant-out-of-range-compare
-CFLAGS += -Wno-parentheses-equality -Wno-incompatible-pointer-types
+CFLAGS += -Wno-parentheses-equality
endif
struct kevent *ev = alloca(EV_SIZE * num * 2);
for (i = j = 0; i < num; i++) {
const int fd = evs[i].fd;
- const void *ptr = evs[i].ptr;
+ void *ptr = evs[i].ptr;
const uint32_t events = evs[i].events;
const uint32_t oevents = tvhpoll_get_events(tp, fd);
if (events == oevents) continue;
void *blacklisted_memcpy(void *dest, const void *src, size_t n)
__attribute__((no_sanitize("thread")))
{
- uint8_t *d = dest, *s = src;
+ uint8_t *d = dest;
+ const uint8_t *s = src;
while (n-- > 0) *d++ = *s++;
return dest;
}