[webkit-reviews] review denied: [Bug 44593] [Qt] Fix warnings in WebKit2 directory : [Attachment 65402] proposed fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 25 06:28:12 PDT 2010


Antonio Gomes <tonikitoo at webkit.org> has denied Csaba Osztrogonac
<ossy at webkit.org>'s request for review:
Bug 44593: [Qt] Fix warnings in WebKit2 directory
https://bugs.webkit.org/show_bug.cgi?id=44593

Attachment 65402: proposed fix
https://bugs.webkit.org/attachment.cgi?id=65402&action=review

------- Additional Comments from Antonio Gomes <tonikitoo at webkit.org>
Looks good, but need another round.

> diff --git a/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
b/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
> index 3e77e46..aae977b 100644
> --- a/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
> +++ b/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
> @@ -59,6 +59,7 @@ void Connection::readyReadHandler()
>      while (m_socket->bytesAvailable()) {
>	   if (!m_currentMessageSize) {
>	       size_t numberOfBytesRead =
m_socket->read(reinterpret_cast<char*>(m_readBuffer.data()), sizeof(size_t));
> +	       Q_UNUSED(numberOfBytesRead);
>	       ASSERT(numberOfBytesRead);

combine both Q_UNUSED and ASSERT in a ASSERT_UNUSED

>	       m_currentMessageSize =
*reinterpret_cast<size_t*>(m_readBuffer.data());
>	   }
> @@ -71,6 +72,7 @@ void Connection::readyReadHandler()
>	   }
>  
>	   size_t numberOfBytesRead =
m_socket->read(reinterpret_cast<char*>(m_readBuffer.data()),
m_currentMessageSize);
> +	   Q_UNUSED(numberOfBytesRead);
>	   ASSERT(numberOfBytesRead);

Ditto.

>	   // The messageID is encoded at the end of the buffer.
> @@ -124,7 +126,7 @@ bool Connection::sendOutgoingMessage(MessageID messageID,
PassOwnPtr<ArgumentEnc
>      m_socket->write(reinterpret_cast<char*>(&bufferSize),
sizeof(bufferSize));
>  
>      qint64 bytesWritten =
m_socket->write(reinterpret_cast<char*>(arguments->buffer()),
arguments->bufferSize());
> -
> +    Q_UNUSED(bytesWritten);
>      ASSERT(bytesWritten == arguments->bufferSize());

Ditto.

>      return true;
>  }
> diff --git a/WebKit2/Shared/qt/WebEventFactoryQt.cpp
b/WebKit2/Shared/qt/WebEventFactoryQt.cpp
> index bdd6a23..043b35e 100644
> --- a/WebKit2/Shared/qt/WebEventFactoryQt.cpp
> +++ b/WebKit2/Shared/qt/WebEventFactoryQt.cpp
> @@ -173,7 +173,7 @@ WebKeyboardEvent
WebEventFactory::createWebKeyboardEvent(QKeyEvent* event)
>  WebTouchEvent WebEventFactory::createWebTouchEvent(QTouchEvent* event)
>  {
>      WebEvent::Type type  = webEventTypeForEvent(event);
> -    WebPlatformTouchPoint::TouchPointState state;
> +    WebPlatformTouchPoint::TouchPointState state =
static_cast<WebPlatformTouchPoint::TouchPointState>(0);
>      unsigned int id;
>      WebEvent::Modifiers modifiers   = modifiersForEvent(event->modifiers());

>      double timestamp 	       = WTF::currentTime();
> @@ -196,6 +196,9 @@ WebTouchEvent
WebEventFactory::createWebTouchEvent(QTouchEvent* event)
>	   case Qt::TouchPointStationary: 
>	       state = WebPlatformTouchPoint::TouchStationary; 
>	       break;
> +	   default:
> +	       ASSERT_NOT_REACHED();
> +	       break;
>	   }
>  
>	   m_touchPoints.append(WebPlatformTouchPoint(id, state,
points.at(i).screenPos().toPoint().x(),
> diff --git a/WebKit2/WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp
b/WebKit2/WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp
> index b8bbb87..3f2ae4f 100644
> --- a/WebKit2/WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp
> +++ b/WebKit2/WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp
> @@ -47,7 +47,7 @@ void NetscapePlugin::platformPaint(GraphicsContext*
context, const IntRect& dirt
>  
>  NPEvent toNP(const WebMouseEvent& event)
>  {
> -    NPEvent npEvent;
> +    NPEvent npEvent = NPEvent();
>  
>      notImplemented();
>  

Strange it is need. I thought the default constructor would do this trick.


More information about the webkit-reviews mailing list