List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:April 7 2011 8:48am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4292)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped

 4292 Jonas Oreland	2011-04-07
      ndb - silence (by ugly casts) warnings due to changing return type of my_recv to ssize_t

    modified:
      storage/ndb/src/common/transporter/TCP_Transporter.cpp
      storage/ndb/src/common/transporter/TransporterRegistry.cpp
      storage/ndb/src/common/util/socket_io.cpp
=== modified file 'storage/ndb/src/common/transporter/TCP_Transporter.cpp'
--- a/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2011-04-07 08:48:50 +0000
@@ -392,7 +392,7 @@ TCP_Transporter::doReceive() {
   // It reads the external TCP/IP interface once
   Uint32 size = receiveBuffer.sizeOfBuffer - receiveBuffer.sizeOfData;
   if(size > 0){
-    const int nBytesRead = my_recv(theSocket,
+    const int nBytesRead = (int)my_recv(theSocket,
 				receiveBuffer.insertPtr,
 				size < maxReceiveSize ? size : maxReceiveSize,
 				0);

=== modified file 'storage/ndb/src/common/transporter/TransporterRegistry.cpp'
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2011-04-07 08:48:50 +0000
@@ -1270,7 +1270,7 @@ void
 TransporterRegistry::consume_extra_sockets()
 {
   char buf[4096];
-  int ret;
+  ssize_t ret;
   int err;
   NDB_SOCKET_TYPE sock = m_extra_wakeup_sockets[0];
   do

=== modified file 'storage/ndb/src/common/util/socket_io.cpp'
--- a/storage/ndb/src/common/util/socket_io.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/common/util/socket_io.cpp	2011-04-07 08:48:50 +0000
@@ -61,7 +61,7 @@ read_socket(NDB_SOCKET_TYPE socket, int 
   if (res <= 0)
     return res;
 
-  return my_recv(socket, &buf[0], buflen, 0);
+  return (int)my_recv(socket, &buf[0], buflen, 0);
 }
 
 extern "C"
@@ -88,7 +88,7 @@ readln_socket(NDB_SOCKET_TYPE socket, in
   do
   {
     int t;
-    while((t = my_recv(socket, ptr, len, MSG_PEEK)) == -1
+    while((t = (int)my_recv(socket, ptr, len, MSG_PEEK)) == -1
           && socket_errno == EINTR);
     
     if(t < 1)
@@ -106,7 +106,7 @@ readln_socket(NDB_SOCKET_TYPE socket, in
 	 */
 	for (len = 1 + i; len; )
 	{
-	  while ((t = my_recv(socket, ptr, len, 0)) == -1
+	  while ((t = (int)my_recv(socket, ptr, len, 0)) == -1
                  && socket_errno == EINTR);
 	  if (t < 1)
 	    return -1;
@@ -129,7 +129,7 @@ readln_socket(NDB_SOCKET_TYPE socket, in
     
     for (int tmp = t; tmp; )
     {
-      while ((t = my_recv(socket, ptr, tmp, 0)) == -1 && socket_errno == EINTR);
+      while ((t = (int)my_recv(socket, ptr, tmp, 0)) == -1 && socket_errno == EINTR);
       if (t < 1)
       {
 	return -1;
@@ -166,7 +166,7 @@ write_socket(NDB_SOCKET_TYPE socket, int
 
   const char * tmp = &buf[0];
   while(len > 0){
-    const int w = my_send(socket, tmp, len, 0);
+    const int w = (int)my_send(socket, tmp, len, 0);
     if(w == -1){
       return -1;
     }


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110407084850-d0rine2hdav1svl9.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4292) Jonas Oreland7 Apr