Remove compiler warnings by fixing list_elem_t and list_head_t definitions

There were a few warnings like this:

	config.c: In function 'store_dev':
	config.c:1078: warning: dereferencing type-punned pointer will break strict-aliasing rules

The problem is caused by the fact that two different types -- list_head_t
and list_elem_t -- are defined in list.h and used for double linked list
routines. In fact, those types are the same, but since they are defined
separately, compiler treats them as such.

Because of those two distinct types, constructs like

	struct st {
		list_elem_t list;
		...
	}
	function cmp(struct st* s, list_head_t* head) {
		return (s->list != (list_elem_t *)head);
	}

leads to the warnings like above (such comparison is used in list_for_each*
routines).

Note that if we remove the type cast, i.e. do
		return (s->list != head);
there will be another warning, like this:
	warning: comparison of distinct pointer types lacks a cast

So, the only decent way to fix it is really define list_elem_t and list_head_t
as the same type. This patch does exactly that.
1 file changed