diff options
author | Thomas Klausner <wiz@NetBSD.org> | 2015-12-16 08:36:24 +0100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-01-05 11:18:48 -0500 |
commit | a221d4737c167589da44595c795d54f2c36b439a (patch) | |
tree | 9c3fd2677e16b32e8b6d5e457b5ae5bf97b08a87 | |
parent | f3593918a0507cc080875788b2776ebe4f57c694 (diff) |
Fix uninitialized variable warnings reported by clang
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Acked-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r-- | include/list.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/list.h b/include/list.h index 39f198590..1accf1096 100644 --- a/include/list.h +++ b/include/list.h @@ -304,7 +304,8 @@ xorg_list_is_empty(struct xorg_list *head) * @param member Member name of the struct xorg_list in the list elements. * */ -#define xorg_list_for_each_entry(pos, head, member) \ +#define xorg_list_for_each_entry(pos, head, member) \ + pos = NULL; \ for (pos = __container_of((head)->next, pos, member); \ &pos->member != (head); \ pos = __container_of(pos->member.next, pos, member)) @@ -317,6 +318,7 @@ xorg_list_is_empty(struct xorg_list *head) * See xorg_list_for_each_entry for more details. */ #define xorg_list_for_each_entry_safe(pos, tmp, head, member) \ + pos = NULL; \ for (pos = __container_of((head)->next, pos, member), \ tmp = __container_of(pos->member.next, pos, member); \ &pos->member != (head); \ |