Skip to content

Commit 5c81ecc

Browse files
committed
Use HEDLEY_CONST_CAST as suggested by Hedley
1 parent 75a827e commit 5c81ecc

File tree

1 file changed

+2
-5
lines changed
  • cmake-init/templates/c/executable/source

1 file changed

+2
-5
lines changed

cmake-init/templates/c/executable/source/lib.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ library create_library()
5858
return lib;
5959
}{% if pm %}
6060

61-
HEDLEY_DIAGNOSTIC_PUSH
62-
HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
6361
void destroy_library(library* lib)
6462
{
65-
free((void*)lib->name);
66-
}
67-
HEDLEY_DIAGNOSTIC_POP{% end %}
63+
free(HEDLEY_CONST_CAST(void*, lib->name));
64+
}{% end %}

0 commit comments

Comments
 (0)