From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Mon, 17 Sep 2018 15:26:11 +0000 (+0100) Subject: Remove clang no-incompatible-pointer-types flag. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4a9d6df1b9f42d436ff9fac2d9c74fb31c9e5a7;p=thirdparty%2Ftvheadend.git Remove clang no-incompatible-pointer-types flag. 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. --- diff --git a/Makefile b/Makefile index c9667be17..7c1c5f7da 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ endif 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 diff --git a/src/tvhpoll.c b/src/tvhpoll.c index 388866833..9e97647c6 100644 --- a/src/tvhpoll.c +++ b/src/tvhpoll.c @@ -193,7 +193,7 @@ static int tvhpoll_add0 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; diff --git a/src/wrappers.c b/src/wrappers.c index 236275578..3fa9ba2cb 100644 --- a/src/wrappers.c +++ b/src/wrappers.c @@ -656,7 +656,8 @@ int regex_match_substring_length(tvh_regex_t *regex, unsigned number) 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; }