second patch.
From 69c810f1e8d4f4a9aedcb18663bc6cdb66f69c2d Mon Sep 17 00:00:00 2001 From: David Carlier <devne...@gmail.com> Date: Tue, 29 Dec 2015 13:15:47 +0000 Subject: [PATCH 2/5] CLEANUP: list struct: void pointers arithmetic removal
second path which applies to the LIST_ELEM macro only. --- include/common/mini-clist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h index da24b33..532a737 100644 --- a/include/common/mini-clist.h +++ b/include/common/mini-clist.h @@ -94,7 +94,7 @@ struct cond_wordlist { * since it's used only once. * Example: LIST_ELEM(cur_node->args.next, struct node *, args) */ -#define LIST_ELEM(lh, pt, el) ((pt)(((void *)(lh)) - ((void *)&((pt)NULL)->el))) +#define LIST_ELEM(lh, pt, el) ((pt)(((unsigned char *)(lh)) - ((unsigned char *)&((pt)NULL)->el))) /* checks if the list head <lh> is empty or not */ #define LIST_ISEMPTY(lh) ((lh)->n == (lh)) -- 2.5.0