Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
freediameter
Commits
764b0f4b
Commit
764b0f4b
authored
Dec 03, 2010
by
Sebastien Decugis
Browse files
Fix warning about value outside enum range
parent
6437cab7
Changes
1
Show whitespace changes
Inline
Side-by-side
extensions/dict_legacy_xml/dict_lxml_xml.c
View file @
764b0f4b
...
...
@@ -630,7 +630,8 @@ static void del_dict_contents(struct t_dictionary * d) {
/* 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 @@ static void SAXstartelem (void * ctx, const xmlChar * name, const xmlChar ** att
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 @@ static void SAXendelem (void * ctx, const xmlChar * name)
}
switch
(
data
->
state
)
{
case
0
:
case
INIT
:
goto
state_machine_error
;
case
START
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment