aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2003-12-21 00:16:54 +0000
committerUlf Lamping <ulf.lamping@web.de>2003-12-21 00:16:54 +0000
commitd604209b2109da45211bd428a4e754b6f13b4f0d (patch)
tree53d85fa84b2a489a8aabde9a01699e58f08b185c /tools
parentdea93d2bee0beec6519f7932095753f8f71fe2ed (diff)
removed some MSVC warnings (added type casts)
svn path=/trunk/; revision=9371
Diffstat (limited to 'tools')
-rw-r--r--tools/lemon/lemon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c
index a2755080af..4b845f2364 100644
--- a/tools/lemon/lemon.c
+++ b/tools/lemon/lemon.c
@@ -25,7 +25,7 @@
** drh@acm.org
** http://www.hwaci.com/drh/
**
-** $Id: lemon.c,v 1.14 2002/08/28 21:04:11 jmayer Exp $
+** $Id: lemon.c,v 1.15 2003/12/21 00:16:54 ulfl Exp $
*/
#include <stdio.h>
#include <stdarg.h>
@@ -3536,10 +3536,13 @@ The arguments are pointers to "const void", and should be cast to
pointers to "const struct symbol *"; however, at least as I read the
spec, "const struct symbol **" is "pointer to pointer to const struct
symbol", not "pointer to const pointer to struct symbol".
+
+To avoid MSVC warnings here, some pointer casts were added.
+So this should be ok for any compiler.
*/
- struct symbol *const *a = a_arg;
- struct symbol *const *b = b_arg;
+ struct symbol *const *a = (struct symbol *const *) a_arg;
+ struct symbol *const *b = (struct symbol *const *) b_arg;
return strcmp((**a).name,(**b).name);
}