summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-02-27 14:40:16 +0000
committerPaul Duffin <paulduffin@google.com>2017-02-27 14:57:56 +0000
commitba34a0c0eeed7538bd405826bf3ac25cecf71c90 (patch)
treed56437913aba209d6ed7494e81936dccb916fb72 /examples
parentb05dbe320cc7cecb104c1b7ae38a57d5f3cecc89 (diff)
downloadexpat-ba34a0c0eeed7538bd405826bf3ac25cecf71c90.tar.gz
Upgrade to expat 2.2.0
The version of 2.2.0 from upstream. This will not yet compile on Android. Following changes will fix issues that prevent compilation. Bug: 30157673 Test: cannot test as does not yet compile Change-Id: I50a7fc074cff17367177cc733ab1e7286f4b63d6
Diffstat (limited to 'examples')
-rw-r--r--examples/elements.c7
-rw-r--r--examples/outline.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/elements.c b/examples/elements.c
index bc04b6b1..0ca1abd9 100644
--- a/examples/elements.c
+++ b/examples/elements.c
@@ -27,6 +27,8 @@ startElement(void *userData, const char *name, const char **atts)
{
int i;
int *depthPtr = (int *)userData;
+ (void)atts;
+
for (i = 0; i < *depthPtr; i++)
putchar('\t');
puts(name);
@@ -37,6 +39,8 @@ static void XMLCALL
endElement(void *userData, const char *name)
{
int *depthPtr = (int *)userData;
+ (void)name;
+
*depthPtr -= 1;
}
@@ -47,6 +51,9 @@ main(int argc, char *argv[])
XML_Parser parser = XML_ParserCreate(NULL);
int done;
int depth = 0;
+ (void)argc;
+ (void)argv;
+
XML_SetUserData(parser, &depth);
XML_SetElementHandler(parser, startElement, endElement);
do {
diff --git a/examples/outline.c b/examples/outline.c
index 3a3c8385..d9b09176 100644
--- a/examples/outline.c
+++ b/examples/outline.c
@@ -49,6 +49,7 @@ static void XMLCALL
start(void *data, const char *el, const char **attr)
{
int i;
+ (void)data;
for (i = 0; i < Depth; i++)
printf(" ");
@@ -66,6 +67,9 @@ start(void *data, const char *el, const char **attr)
static void XMLCALL
end(void *data, const char *el)
{
+ (void)data;
+ (void)el;
+
Depth--;
}
@@ -73,6 +77,9 @@ int
main(int argc, char *argv[])
{
XML_Parser p = XML_ParserCreate(NULL);
+ (void)argc;
+ (void)argv;
+
if (! p) {
fprintf(stderr, "Couldn't allocate memory for parser\n");
exit(-1);