Skip to content

Commit 4669bb9

Browse files
bgoglinndenoyelle
authored andcommitted
nolibxml: fix a the exporting of content inside a xml node
length isn't needed, and the missing "%s" caused a warning. Signed-off-by: Brice Goglin <[email protected]>
1 parent 3a9c5f0 commit 4669bb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hwloc/topology-xml-nolibxml.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright © 2009 CNRS
3-
* Copyright © 2009-2018 Inria. All rights reserved.
3+
* Copyright © 2009-2019 Inria. All rights reserved.
44
* Copyright © 2009-2011 Université Bordeaux
55
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
66
* See COPYING in top-level directory.
@@ -653,7 +653,7 @@ hwloc__nolibxml_export_end_object(hwloc__xml_export_state_t state, const char *n
653653
}
654654

655655
static void
656-
hwloc__nolibxml_export_add_content(hwloc__xml_export_state_t state, const char *buffer, size_t length)
656+
hwloc__nolibxml_export_add_content(hwloc__xml_export_state_t state, const char *buffer, size_t length __hwloc_attribute_unused)
657657
{
658658
hwloc__nolibxml_export_state_data_t ndata = (void *) state->data;
659659
int res;
@@ -665,7 +665,7 @@ hwloc__nolibxml_export_add_content(hwloc__xml_export_state_t state, const char *
665665
}
666666
ndata->has_content = 1;
667667

668-
res = hwloc_snprintf(ndata->buffer, ndata->remaining, buffer, length);
668+
res = hwloc_snprintf(ndata->buffer, ndata->remaining, "%s", buffer);
669669
hwloc__nolibxml_export_update_buffer(ndata, res);
670670
}
671671

0 commit comments

Comments
 (0)