<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">The problem here is Qt uses older
compilers which do not detect when all cases are handled before
the end of the function (like the example of Ryosuke).<br>
<br>
It looks like this will not be a problem for much longer. Qt
people are giving up on developing a web engine:
<a class="moz-txt-link-freetext" href="http://blog.qt.digia.com/blog/2013/09/12/introducing-the-qt-webengine/">http://blog.qt.digia.com/blog/2013/09/12/introducing-the-qt-webengine/</a><br>
<br>
Benjamin<br>
<br>
On 9/12/13 4:19 PM, Myles C. Maxfield wrote:<br>
</div>
<blockquote
cite="mid:CALz+48XUJvHALy19k0V8Ahddfy1uA-4=JuTfCyk7+Jmbj5Qa4Q@mail.gmail.com"
type="cite">
<div dir="ltr">I can't speak for Qt, but this warning has been
helpful for me in the past.</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Sep 12, 2013 at 2:07 PM,
Ryosuke Niwa <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:rniwa@webkit.org" target="_blank">rniwa@webkit.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://trac.webkit.org/changeset/155643"
target="_blank">http://trac.webkit.org/changeset/155643</a> broke
Qt build with an error saying:</div>
<div><br>
</div>
<div>
<div>Source/JavaScriptCore/dfg/DFGGPRInfo.h:169:5:
error: control reaches end of non-void function
[-Werror=return-type] </div>
<div>cc1plus: all warnings being treated as errors</div>
</div>
<div><br>
</div>
<div>because of the following code:</div>
<div><br>
</div>
<div>
<div>GPRReg gpr(WhichValueWord which) const</div>
<div>{</div>
<div> switch (which) {</div>
<div> case TagWord:</div>
<div> return tagGPR();</div>
<div> case PayloadWord:</div>
<div> return payloadGPR();</div>
<div> }</div>
<div>}</div>
<div><br>
</div>
<div>But the code works just fine as is because
WhichValueWord only takes two values (TagWord and
PayloadWord) and they're all handled in the switch
statement.</div>
<div><br>
</div>
<div>Can we disable this warning so that we don't have
to add a bogus code like the one I had to add in <a
moz-do-not-send="true"
href="http://trac.webkit.org/changeset/155649/trunk/Source/JavaScriptCore/dfg/DFGGPRInfo.h"
target="_blank">http://trac.webkit.org/changeset/155649/trunk/Source/JavaScriptCore/dfg/DFGGPRInfo.h</a>
?</div>
<div><br>
</div>
<div>
<div>- R. Niwa</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
webkit-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:webkit-dev@lists.webkit.org">webkit-dev@lists.webkit.org</a><br>
<a moz-do-not-send="true"
href="https://lists.webkit.org/mailman/listinfo/webkit-dev"
target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
webkit-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:webkit-dev@lists.webkit.org">webkit-dev@lists.webkit.org</a>
<a class="moz-txt-link-freetext" href="https://lists.webkit.org/mailman/listinfo/webkit-dev">https://lists.webkit.org/mailman/listinfo/webkit-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>