From e945c948d1c44a8dd3160538882859d5d72b7d57 Mon Sep 17 00:00:00 2001 From: Jonathan <74002342+jd-imi@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:53:40 +0200 Subject: [PATCH] vmac.c : Fix a warning that 'device_id' is not used (#510) --- src/bacnet/basic/bbmd6/vmac.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bacnet/basic/bbmd6/vmac.c b/src/bacnet/basic/bbmd6/vmac.c index 2cc79260..5a69b65b 100644 --- a/src/bacnet/basic/bbmd6/vmac.c +++ b/src/bacnet/basic/bbmd6/vmac.c @@ -54,7 +54,11 @@ static bool VMAC_Debug = false; } #else #define PRINTF(...) + +#if !defined UNUSED +#define UNUSED(x) ((void)(x)) #endif +#endif // PRINT_ENABLED /** * @brief Enable debugging if print is enabled @@ -263,6 +267,9 @@ void VMAC_Cleanup(void) if (VMAC_List) { do { device_id = Keylist_Key(VMAC_List, index); +#if !PRINT_ENABLED + UNUSED(device_id); +#endif pVMAC = Keylist_Data_Delete_By_Index(VMAC_List, index); if (pVMAC) { PRINTF("VMAC List: %lu [", (unsigned long)device_id);