commit 7b15ea393ffc0710534b6072c4d4f7706f1b426e
Author: Richard Heck <[email protected]>
Date: Sun Jun 12 00:12:03 2016 -0400
Add a check to please coverity.
Fixes #23496.
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index fc2170d..87ee553 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -2751,9 +2751,13 @@ bool GuiView::closeWorkArea(GuiWorkArea * wa)
bool GuiView::closeBuffer()
{
GuiWorkArea * wa = currentMainWorkArea();
+ // coverity complained about this
+ // it seems unnecessary, but perhaps is worth the check
+ LASSERT(wa, return false);
+
setCurrentWorkArea(wa);
Buffer & buf = wa->bufferView().buffer();
- return wa && closeWorkArea(wa, !buf.parent());
+ return closeWorkArea(wa, !buf.parent());
}
diff --git a/src/frontends/qt4/InGuiThread.h b/src/frontends/qt4/InGuiThread.h
index 65fd648..86c4afe 100644
--- a/src/frontends/qt4/InGuiThread.h
+++ b/src/frontends/qt4/InGuiThread.h
@@ -52,7 +52,8 @@ class InGuiThread : private IntoGuiThreadMover
{
public:
- InGuiThread() {}
+ // please coverity by explicitly initalizing this variable.
+ InGuiThread() : return_value_(R()) {}
template<class F>
R call(F f)