www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples

Archive Index This month's Index

Subject: warning: comparison between signed and unsigned

warning: comparison between signed and unsigned

From: Steven Van Ingelgem <steven_at_vaningelgem.be>
Date: Mon, 27 Jul 2009 20:33:50 +0200

cc1: warnings being treated as errors
/Users/steven/src/server_monitor/externals/libssh2/src/session.c: In
function 'libssh2_poll':
/Users/steven/src/server_monitor/externals/libssh2/src/session.c:1375:
*warning:
comparison between signed and unsigned*
/Users/steven/src/server_monitor/externals/libssh2/src/session.c:1383:
*warning:
comparison between signed and unsigned*

Index: /Users/steven/src/server_monitor/externals/libssh2/src/session.c
===================================================================
--- /Users/steven/src/server_monitor/externals/libssh2/src/session.c
(revision 253)
+++ /Users/steven/src/server_monitor/externals/libssh2/src/session.c
(working copy)
@@ -1372,7 +1372,7 @@

         case LIBSSH2_POLLFD_CHANNEL:
             FD_SET(fds[i].fd.channel->session->socket_fd, &rfds);
- if (fds[i].fd.channel->session->socket_fd > maxfd)
+ if (fds[i].fd.channel->session->socket_fd > (unsigned
int)maxfd)
                 maxfd = fds[i].fd.channel->session->socket_fd;
             if (!session)
                 session = fds[i].fd.channel->session;
@@ -1380,7 +1380,7 @@

         case LIBSSH2_POLLFD_LISTENER:
             FD_SET(fds[i].fd.listener->session->socket_fd, &rfds);
- if (fds[i].fd.listener->session->socket_fd > maxfd)
+ if (fds[i].fd.listener->session->socket_fd > (unsigned
int)maxfd)
                 maxfd = fds[i].fd.listener->session->socket_fd;
             if (!session)
                 session = fds[i].fd.listener->session;

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-07-27

the libssh2 team