From ce3d4de40fa89b2b209ab19acd763eec83bc70f1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 6 Dec 2022 18:17:12 -0800 Subject: Stop casting _parse_data pointers through (char *) and back Eliminates clang warnings: cppsetup.c:41:30: warning: cast from 'char *' to 'struct _parse_data *' increases required alignment from 1 to 8 [-Wcast-align] struct _parse_data *pd = (struct _parse_data *) ip->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cppsetup.c:69:30: warning: cast from 'char *' to 'struct _parse_data *' increases required alignment from 1 to 8 [-Wcast-align] struct _parse_data *pd = (struct _parse_data *) ip->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith --- ifparser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ifparser.h') diff --git a/ifparser.h b/ifparser.h index 5d88d05..cbc7909 100644 --- a/ifparser.h +++ b/ifparser.h @@ -70,7 +70,7 @@ typedef struct _if_parser { long (*eval_variable)(struct _if_parser *, const char *, int); int (*eval_defined)(struct _if_parser *, const char *, int); } funcs; - char *data; + struct _parse_data *data; } IfParser; const char *ParseIfExpression(IfParser *, const char *, long *); -- cgit v1.2.3