From f59fbae7a1890b243c69f0ff20099c6d6aa93c4e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 23 Sep 2023 12:11:31 -0700 Subject: XdmcpWriteHeader: drop unnecessary cast of free() argument Clears clang complaint: Write.c:48:7: warning: cast from 'BYTE *' (aka 'unsigned char *') to 'unsigned long *' increases required alignment from 1 to 8 [-Wcast-align] free((unsigned long *)(buffer->data)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith --- Write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Write.c b/Write.c index 8eb9c50..ef7f030 100644 --- a/Write.c +++ b/Write.c @@ -45,7 +45,7 @@ XdmcpWriteHeader ( newData = (BYTE *) malloc(XDM_MAX_MSGLEN * sizeof (BYTE)); if (!newData) return FALSE; - free((unsigned long *)(buffer->data)); + free(buffer->data); buffer->data = newData; buffer->size = XDM_MAX_MSGLEN; } -- cgit v1.2.3