[PATCH 07/14] xfree86/parser: Fix -Wshadow warnings
Adam Jackson
ajax at redhat.com
Fri Dec 13 15:05:45 PST 2013
Did you know the parser defines a global named 'val'? Gross.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
hw/xfree86/parser/scan.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 55a8442..f5f8f66 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -1135,30 +1135,30 @@ xf86addComment(char *cur, const char *add)
}
Bool
-xf86getBoolValue(Bool *val, const char *str)
+xf86getBoolValue(Bool *v, const char *str)
{
- if (!val || !str)
+ if (!v || !str)
return FALSE;
if (*str == '\0') {
- *val = TRUE;
+ *v = TRUE;
}
else {
if (xf86nameCompare(str, "1") == 0)
- *val = TRUE;
+ *v = TRUE;
else if (xf86nameCompare(str, "on") == 0)
- *val = TRUE;
+ *v = TRUE;
else if (xf86nameCompare(str, "true") == 0)
- *val = TRUE;
+ *v = TRUE;
else if (xf86nameCompare(str, "yes") == 0)
- *val = TRUE;
+ *v = TRUE;
else if (xf86nameCompare(str, "0") == 0)
- *val = FALSE;
+ *v = FALSE;
else if (xf86nameCompare(str, "off") == 0)
- *val = FALSE;
+ *v = FALSE;
else if (xf86nameCompare(str, "false") == 0)
- *val = FALSE;
+ *v = FALSE;
else if (xf86nameCompare(str, "no") == 0)
- *val = FALSE;
+ *v = FALSE;
else
return FALSE;
}
--
1.8.4.2
More information about the xorg-devel
mailing list