]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Remove clang no-incompatible-pointer-types flag.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Mon, 17 Sep 2018 15:26:11 +0000 (16:26 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 20 Sep 2018 12:30:04 +0000 (14:30 +0200)
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.

Makefile
src/tvhpoll.c
src/wrappers.c

index c9667be172b7258aca1d870e08d4d519b1a96eb1..7c1c5f7da5d63a3c8dd8efde1989989547266d76 100644 (file)
--- 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
 
 
index 3888668339d042754522be301547c7a636de74c1..9e97647c6e3430c37ec5f84ebfefec6d6d5748f7 100644 (file)
@@ -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;
index 2362755784e3859acce6f3984b5a38c971146a8c..3fa9ba2cba72972cabc91f95c6a73c298174b1f5 100644 (file)
@@ -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;
 }