[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Nov 21 10:29:35 UTC 2018
vcl/source/app/salvtables.cxx | 5 ++---
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 2 +-
vcl/unx/gtk3/gtk3gtkinst.cxx | 7 ++++---
3 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 31e173eea29c2f799184085272404b12535e8259
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 20 15:13:08 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 21 11:29:13 2018 +0100
coverity#1441469 silence Dereference null return value
and
coverity#1441468 Uninitialized pointer field
coverity#1441470 Uninitialized pointer field
coverity#1441467 Unchecked return value
Change-Id: I485fb0b5a83838a3c4913a74b5ea3ae70b4f6bd1
Reviewed-on: https://gerrit.libreoffice.org/63679
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 67ac7ed97986..b117e34f15d6 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1753,10 +1753,8 @@ IMPL_LINK(SalInstanceEntry, CursorListener, VclWindowEvent&, rEvent, void)
struct SalInstanceTreeIter : public weld::TreeIter
{
SalInstanceTreeIter(const SalInstanceTreeIter* pOrig)
+ : iter(pOrig ? pOrig->iter : nullptr)
{
- if (!pOrig)
- return;
- iter = pOrig->iter;
}
SvTreeListEntry* iter;
};
@@ -2160,6 +2158,7 @@ IMPL_LINK_NOARG(SalInstanceTreeView, ExpandingHdl, SvTreeListBox*, bool)
if (pEntry->HasChildren())
{
auto pChild = m_xTreeView->FirstChild(pEntry);
+ assert(pChild);
if (m_xTreeView->GetEntryText(pChild) == "<dummy>")
{
m_xTreeView->RemoveEntry(pChild);
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index b4603bb32a80..2dd75d4f3166 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1233,7 +1233,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC
&iter, 0, &item, -1);
aItemList[i] = OUString(item, strlen(item), RTL_TEXTENCODING_UTF8);
g_free(item);
- gtk_tree_model_iter_next(pTree, &iter);
+ (void)gtk_tree_model_iter_next(pTree, &iter);
}
}
aAny <<= aItemList;
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 7e613bd202d1..885669361d99 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4129,9 +4129,10 @@ struct GtkInstanceTreeIter : public weld::TreeIter
{
GtkInstanceTreeIter(const GtkInstanceTreeIter* pOrig)
{
- if (!pOrig)
- return;
- iter = pOrig->iter;
+ if (pOrig)
+ iter = pOrig->iter;
+ else
+ memset(&iter, 0, sizeof(iter));
}
GtkTreeIter iter;
};
More information about the Libreoffice-commits
mailing list