Revision: 422 http://vde.svn.sourceforge.net/vde/?rev=422&view=rev Author: shammash Date: 2010-06-27 23:32:10 +0000 (Sun, 27 Jun 2010)
Log Message: ----------- Fix some compile-time warnings Signed-off-by: Luca Bigliardi <shamm...@artha.org> Modified Paths: -------------- trunk/vde-2/src/lib/libvdemgmt.c trunk/vde-2/src/lib/libvdeplug.c trunk/vde-2/src/vde_autolink.c trunk/vde-2/src/vde_cryptcab/vde_cryptcab_client.c Modified: trunk/vde-2/src/lib/libvdemgmt.c =================================================================== --- trunk/vde-2/src/lib/libvdemgmt.c 2010-06-27 11:37:01 UTC (rev 421) +++ trunk/vde-2/src/lib/libvdemgmt.c 2010-06-27 23:32:10 UTC (rev 422) @@ -39,8 +39,8 @@ #define DEBUGADD "debug/add" #define DEBUGDEL "debug/del" -#define CHECK(expr, errval) { char errstr[1024]; if ((expr) == (errval)) { sprintf(errstr, "%s %d %d", __func__, __LINE__, (int)errval); goto error; } } -#define CHECKNOT(expr, errval) { char errstr[1024]; if ((expr) != (errval)) { sprintf(errstr, "%s %d %d", __func__, __LINE__, (int)errval); perror(errstr); goto error; } } +#define CHECK(expr, errval) { char errstr[1024]; if ((expr) == (errval)) { sprintf(errstr, "%s %d %ld", __func__, __LINE__, (long int)errval); perror(errstr); goto error; } } +#define CHECKNOT(expr, errval) { char errstr[1024]; if ((expr) != (errval)) { sprintf(errstr, "%s %d %ld", __func__, __LINE__, (long int)errval); perror(errstr); goto error; } } #define DATATAG 1 Modified: trunk/vde-2/src/lib/libvdeplug.c =================================================================== --- trunk/vde-2/src/lib/libvdeplug.c 2010-06-27 11:37:01 UTC (rev 421) +++ trunk/vde-2/src/lib/libvdeplug.c 2010-06-27 23:32:10 UTC (rev 422) @@ -28,6 +28,7 @@ #include <grp.h> #include <sys/types.h> #include <sys/stat.h> +#include <sys/uio.h> #include <unistd.h> #include <string.h> Modified: trunk/vde-2/src/vde_autolink.c =================================================================== --- trunk/vde-2/src/vde_autolink.c 2010-06-27 11:37:01 UTC (rev 421) +++ trunk/vde-2/src/vde_autolink.c 2010-06-27 23:32:10 UTC (rev 422) @@ -348,7 +348,7 @@ if ( limit == NULL ) return NULL; - headlen = (int)limit - (int)old_s; + headlen = (int)(limit - old_s); diff = newlen - oldlen; taillen = slen - ( headlen + oldlen ); @@ -606,10 +606,10 @@ /* check if we have name and type */ endname = strstr(arg, " "); - namelen = (int)endname - (int)arg; + namelen = (int)(endname - arg); if( namelen <= 0 ) return EINVAL; - vallen = ((int)arg+strlen(arg)) - ((int)endname+1); + vallen = (int)(arg+strlen(arg) - (endname+1)); if( vallen <= 0 ) return EINVAL; if( sscanf(endname+1, "%i", &value) != 1) @@ -650,7 +650,7 @@ /* check if we have name and type */ endname = strstr(arg, " "); - namelen = (int)endname - (int)arg; + namelen = (int)(endname - arg); if( namelen <= 0 ) return EINVAL; typelen = strlen(arg) - namelen -1; @@ -708,7 +708,7 @@ /* check if we have name and type */ endname = strstr(arg, " "); - namelen = (int)endname - (int)arg; + namelen = (int)(endname - arg); if( namelen <= 0 ) return EINVAL; typelen = strlen(arg) - namelen -1; @@ -827,7 +827,7 @@ /* check if we have name and remotehost */ endname = strstr(arg, " "); - namelen = (int)endname - (int)arg; + namelen = (int)(endname - arg); if( namelen <= 0 ) return EINVAL; hostlen = strlen(arg) - namelen -1; @@ -986,7 +986,7 @@ /* check if we have type and command */ char *endtype = strstr(arg, " "); - typelen = (int)endtype - (int)arg; + typelen = (int)(endtype - arg); if( typelen <= 0 ) return EINVAL; cmdlen = strlen(arg) - typelen -1; if( cmdlen <= 0 ) return EINVAL; Modified: trunk/vde-2/src/vde_cryptcab/vde_cryptcab_client.c =================================================================== --- trunk/vde-2/src/vde_cryptcab/vde_cryptcab_client.c 2010-06-27 11:37:01 UTC (rev 421) +++ trunk/vde-2/src/vde_cryptcab/vde_cryptcab_client.c 2010-06-27 23:32:10 UTC (rev 422) @@ -188,7 +188,7 @@ { int pollret; static struct pollfd pfd[2]; - size_t peerlen; + socklen_t peerlen; int datafd; struct timeval now; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ vde-users mailing list vde-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vde-users