From: Victor Julien Date: Fri, 21 Jun 2019 11:14:21 +0000 (+0200) Subject: mem: fix shadow declaration warning X-Git-Tag: suricata-5.0.0-rc1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3963%2Fhead;p=thirdparty%2Fsuricata.git 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. --- 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; \