diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-19 14:47:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-19 21:07:04 +0100 |
commit | 7a5014b24e2755e56790dbfd56fea2c789aa792c (patch) | |
tree | 2d9616b4eff5f11c790f774f5b293ff1801886c9 /sd | |
parent | bd7e258bac69f3b9f9e87128aacb989d23e24d4f (diff) |
silence coverity unchecked return value from library on xmlText* functions
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 4 | ||||
-rw-r--r-- | sd/source/core/drawdoc.cxx | 10 | ||||
-rw-r--r-- | sd/source/core/sdpage2.cxx | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 3c7867d1b07a..cc11e2483991 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -354,7 +354,7 @@ xmlDocUniquePtr SdTiledRenderingTest::parseXmlDump() // Create the xml writer. m_pXmlBuffer = xmlBufferCreate(); xmlTextWriterPtr pXmlWriter = xmlNewTextWriterMemory(m_pXmlBuffer, 0); - xmlTextWriterStartDocument(pXmlWriter, nullptr, nullptr, nullptr); + (void)xmlTextWriterStartDocument(pXmlWriter, nullptr, nullptr, nullptr); // Create the dump. SdXImpressDocument* pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); @@ -362,7 +362,7 @@ xmlDocUniquePtr SdTiledRenderingTest::parseXmlDump() pImpressDocument->GetDoc()->dumpAsXml(pXmlWriter); // Delete the xml writer. - xmlTextWriterEndDocument(pXmlWriter); + (void)xmlTextWriterEndDocument(pXmlWriter); xmlFreeTextWriter(pXmlWriter); return xmlDocUniquePtr(xmlParseMemory(reinterpret_cast<const char*>(xmlBufferContent(m_pXmlBuffer)), xmlBufferLength(m_pXmlBuffer))); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 48769e0b88da..182377c2dff7 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -1185,11 +1185,11 @@ void SdDrawDocument::dumpAsXml(xmlTextWriterPtr pWriter) const pWriter = xmlNewTextWriterFilename("model.xml", 0); xmlTextWriterSetIndent(pWriter,1); xmlTextWriterSetIndentString(pWriter, BAD_CAST(" ")); - xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr); + (void)xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr); bOwns = true; } - xmlTextWriterStartElement(pWriter, BAD_CAST("SdDrawDocument")); - xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SdDrawDocument")); + (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); if (mpOutliner) mpOutliner->dumpAsXml(pWriter); @@ -1197,10 +1197,10 @@ void SdDrawDocument::dumpAsXml(xmlTextWriterPtr pWriter) const if (GetUndoManager()) GetUndoManager()->dumpAsXml(pWriter); - xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterEndElement(pWriter); if (bOwns) { - xmlTextWriterEndDocument(pWriter); + (void)xmlTextWriterEndDocument(pWriter); xmlFreeTextWriter(pWriter); } } diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index dcb63d5e51ea..2719f3dea8f7 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -626,7 +626,7 @@ void SdPage::getGraphicsForPrefetch(std::vector<Graphic*>& graphics) const void SdPage::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("SdPage")); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SdPage")); const char* pPageKind = nullptr; switch (mePageKind) @@ -642,11 +642,11 @@ void SdPage::dumpAsXml(xmlTextWriterPtr pWriter) const break; } if (pPageKind) - xmlTextWriterWriteAttribute(pWriter, BAD_CAST("mePageKind"), BAD_CAST(pPageKind)); + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("mePageKind"), BAD_CAST(pPageKind)); FmFormPage::dumpAsXml(pWriter); - xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterEndElement(pWriter); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |