From 2bd148ab374076c7f7dc5cfb66c46bd0f4101e3d Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 26 Nov 2025 14:02:01 +0100 Subject: [PATCH] add comment why cast is needed --- modules/libcom/src/macLib/macUtil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/libcom/src/macLib/macUtil.c b/modules/libcom/src/macLib/macUtil.c index 61499425e..920ac006f 100644 --- a/modules/libcom/src/macLib/macUtil.c +++ b/modules/libcom/src/macLib/macUtil.c @@ -224,8 +224,8 @@ epicsStdCall macParseDefns( } /* free workspace */ - free( ( void * ) ptr ); - free( ( void * ) end ); + free( ( void * ) ptr ); /* cast away const */ + free( ( void * ) end ); /* cast away const */ free( del ); /* debug output */ @@ -238,8 +238,8 @@ epicsStdCall macParseDefns( /* error exit */ error: errlogPrintf( "macParseDefns: failed to allocate memory\n" ); - if ( ptr != NULL ) free( ( void * ) ptr ); - if ( end != NULL ) free( ( void * ) end ); + if ( ptr != NULL ) free( ( void * ) ptr ); /* cast away const */ + if ( end != NULL ) free( ( void * ) end ); /* cast away const */ if ( del != NULL ) free( del ); *pairs = NULL; return -1;