From 1bbcb5ef6e2c13da62caef33d51091c1199ef3cd Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Fri, 5 Nov 2021 22:52:47 +0100 Subject: [PATCH] pkg/lua: add -Wno-cast-align --- pkg/lua/Makefile | 2 ++ pkg/lua/contrib/binsearch.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/lua/Makefile b/pkg/lua/Makefile index 54ddbf1aae..c2eb5460ae 100644 --- a/pkg/lua/Makefile +++ b/pkg/lua/Makefile @@ -6,5 +6,7 @@ PKG_LICENSE=MIT include $(RIOTBASE)/pkg/pkg.mk +CFLAGS += -Wno-cast-align + all: Makefile.lua $(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR) -f $(CURDIR)/Makefile.lua diff --git a/pkg/lua/contrib/binsearch.c b/pkg/lua/contrib/binsearch.c index 2aa7f96264..850fc74e0e 100644 --- a/pkg/lua/contrib/binsearch.c +++ b/pkg/lua/contrib/binsearch.c @@ -26,7 +26,7 @@ int binsearch_str(const void *start, size_t offset, size_t stride, size_t nmemb, while (lo < hi) { size_t mid = (lo + hi) / 2; - const char *target = *((const char *const *)(cstart + mid * stride)); + const char *target = *((const char *const *)(uintptr_t)(cstart + mid * stride)); int cmp = strncmp(str, target, n); if (cmp == 0) {