Martin Vermeer wrote:
On Fri, Aug 17, 2007 at 09:22:16AM +0200, Abdelrazak Younes wrote:
Martin,
This is for you I guess:
src\insets\insetcollapsable.cpp(71) : warning C4715:
'lyx::InsetCollapsable::geometry' : not all control paths return a value
Abdel.
Yes, I am getting that too: control reaches end of non-void
function. But if you manually trace the function, you see
that it cannot really happen ;-)
Is the compiler being over-careful? I suppose we could
shut up this warning. But should we?
No, just put a dummy warning at the end:
Actually the breaks are unnecessary too.
Indeed. See patch.
Abdel.
Index: InsetCollapsable.cpp
===================================================================
--- InsetCollapsable.cpp (revision 19614)
+++ InsetCollapsable.cpp (working copy)
@@ -60,14 +60,14 @@
return TopButton;
} else
return ButtonOnly;
- break;
case Minimalistic:
return NoButton;
- break;
case Conglomerate:
return ( status_ == Open ? SubLabel : Corners );
- break;
}
+
+ // dummy return to shut down a warning:
+ return LeftButton;
}