[PATCH:libXvMC] Rename local err variable in XW_RSYM macro to avoid shadow warnings
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Dec 14 10:15:20 PST 2013
Clears many warnings of the form:
XvMCWrapper.c: In function 'initW':
XvMCWrapper.c:362:5: warning: declaration of 'err' shadows a previous local [-Wshadow]
XvMCWrapper.c:267:11: warning: shadowed declaration is here [-Wshadow]
due to variable declared in macro block sharing "err" name with a
variable declared in the function calling the macro.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
wrapper/XvMCWrapper.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/wrapper/XvMCWrapper.c b/wrapper/XvMCWrapper.c
index bff5a8b..9bdf033 100644
--- a/wrapper/XvMCWrapper.c
+++ b/wrapper/XvMCWrapper.c
@@ -178,15 +178,15 @@ static void *handle2;
#define XW_RSYM(base,handle,handle2,pointer, retval) \
do { \
- register char *err; \
+ register char *symerr; \
base.pointer = (pointer##P) dlsym((handle),#pointer); \
- if ((err = dlerror()) != NULL) { \
+ if ((symerr = dlerror()) != NULL) { \
if (!handle2) { \
- fprintf(stderr,"%s\n",err); return retval; \
+ fprintf(stderr,"%s\n",symerr); return retval; \
} \
base.pointer = (pointer##P) dlsym((handle2),#pointer); \
- if ((err = dlerror()) != NULL) { \
- fprintf(stderr,"%s\n",err); return retval; \
+ if ((symerr = dlerror()) != NULL) { \
+ fprintf(stderr,"%s\n",symerr); return retval; \
} \
} \
} while (0);
--
1.7.9.2
More information about the xorg-devel
mailing list