Mercurial > hg > freeDiameter
changeset 616:f2791162c1f2
Fix warning about value outside enum range
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 03 Dec 2010 14:31:08 +0900 |
parents | 8abafd66a617 |
children | c16583e80ffe |
files | extensions/dict_legacy_xml/dict_lxml_xml.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/dict_legacy_xml/dict_lxml_xml.c Fri Dec 03 13:31:41 2010 +0900 +++ b/extensions/dict_legacy_xml/dict_lxml_xml.c Fri Dec 03 14:31:08 2010 +0900 @@ -630,7 +630,8 @@ /* The states for the SAX parser, corresponding roughly to the expected structure of the XML file. We use the states mostly to validate the XML file. */ enum state { - START = 1, /* In "dictionary" */ + INIT = 0, + START, /* In "dictionary" */ IN_VENDOR, IN_APPLICATION, /* note that "base" is equivalent to "application" for our state machine */ IN_COMMAND, @@ -714,7 +715,7 @@ goto xml_tree_error; switch (data->state) { - case 0: /* we are just starting. We only expect a <dictionary> tag, reject anything else. */ + case INIT: /* we are just starting. We only expect a <dictionary> tag, reject anything else. */ if (strcasecmp((char *)name, "dictionary")) goto xml_tree_error; @@ -1028,7 +1029,7 @@ } switch (data->state) { - case 0: + case INIT: goto state_machine_error; case START: