From f5518e596e6513ac4a881a35448a7361a9969135 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Fri, 30 Aug 2024 16:28:02 -0400 Subject: [PATCH] tests: Use free rather than TPM_Free (OS/X) Use free rather than TPM_Free to avoid the following warning: tpm2_setprofile.c:377:18: warning: passing 'char *' to parameter \ of type 'unsigned char *' converts between pointers to integer \ types with different sign [-Wpointer-sign] TPM_Free(profile); ../include/libtpms/tpm_memory.h:57:36: note: passing argument to \ parameter 'buffer' here void TPM_Free(unsigned char *buffer); Signed-off-by: Stefan Berger --- tests/tpm2_setprofile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/tpm2_setprofile.c b/tests/tpm2_setprofile.c index c0be0e84a..d483df11e 100644 --- a/tests/tpm2_setprofile.c +++ b/tests/tpm2_setprofile.c @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -374,7 +375,7 @@ int main(void) profile, testcases[i].exp_profile); goto exit; } - TPM_Free(profile); + free(profile); profile = NULL; for (j = 0; @@ -412,7 +413,7 @@ int main(void) ret = 0; exit: - TPM_Free(profile); + free(profile); TPM_Free(rbuffer); return ret;