From 35b88991c309a36bee741ced2f1935fb85d1d0d0 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 21 Jun 2019 13:14:21 +0200 Subject: [PATCH] mem: fix shadow declaration warning Avoid clash by adding a leading underscore to the declaration in the macro. These temporary vars should never clash with valid variables from the code where they are called from. --- src/util-mem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util-mem.h b/src/util-mem.h index 3a49cec46d..d90c7c6bfc 100644 --- a/src/util-mem.h +++ b/src/util-mem.h @@ -269,8 +269,8 @@ SC_ATOMIC_EXTERN(unsigned int, engine_stage); #define SCMallocAligned(a, b) ({ \ void *ptrmem = NULL; \ \ - int r = posix_memalign(&ptrmem, (b), (a)); \ - if (r != 0 || ptrmem == NULL) { \ + int _r = posix_memalign(&ptrmem, (b), (a)); \ + if (_r != 0 || ptrmem == NULL) { \ if (ptrmem != NULL) { \ free(ptrmem); \ ptrmem = NULL; \ -- 2.47.2