Commit 815d8ea9 authored by Michael Jerris's avatar Michael Jerris

raise warning level on msvc build for test_nua, cast -1 to unsigned and...

raise warning level on msvc build for test_nua, cast -1 to unsigned and correct data types on several vars

darcs-hash:20061121202803-16063-2887c808e99920b42fd378c701b844b677557a71.gz
parent 9b32a359
......@@ -124,7 +124,7 @@ int test_nua_init(struct context *ctx,
su_sockaddr_t su[1];
socklen_t sulen = sizeof su;
char b[64];
int len;
size_t len;
ta_list ta;
if (print_headings)
......
......@@ -417,7 +417,7 @@ int test_nat_flush(struct nat *nat)
return su_seterrno(EFAULT);
return su_task_execute(su_clone_task(nat->clone),
(void *)invalidate_bindings, nat, NULL);
(int (*)(void *))invalidate_bindings, nat, NULL);
}
/* ====================================================================== */
......@@ -449,7 +449,7 @@ struct binding *nat_binding_new(struct nat *nat,
b->nat = nat;
b->socktype = socktype;
b->protocol = protocol;
b->in_socket = in_socket, b->out_socket = -1;
b->in_socket = in_socket, b->out_socket = (unsigned)-1;
b->in_register = -1, b->out_register = -1;
if (binding_init(b, protoname, connected, nat->fake, from, fromlen) < 0)
......@@ -647,7 +647,7 @@ static int new_udp(struct nat *nat, su_wait_t *wait, struct binding *dummy)
}
b = nat_binding_new(nat, "UDP", SOCK_DGRAM, IPPROTO_UDP, nat->symmetric,
-1, from, fromlen);
(unsigned)-1, from, fromlen);
if (b == NULL)
return 0;
......
......@@ -236,8 +236,8 @@ int test_nua_params(struct context *ctx)
sip_from_t const *from = NONE;
char const *from_str = "NONE";
unsigned retry_count = -1;
unsigned max_subscriptions = -1;
unsigned retry_count = (unsigned)-1;
unsigned max_subscriptions = (unsigned)-1;
char const *soa_name = "NONE";
int media_enable = -1;
......@@ -247,10 +247,10 @@ int test_nua_params(struct context *ctx)
int only183_100rel = -1;
int auto_answer = -1;
int auto_ack = -1;
unsigned invite_timeout = -1;
unsigned invite_timeout = (unsigned)-1;
unsigned session_timer = -1;
unsigned min_se = -1;
unsigned session_timer = (unsigned)-1;
unsigned min_se = (unsigned)-1;
int refresher = -1;
int update_refresh = -1;
......@@ -262,7 +262,7 @@ int test_nua_params(struct context *ctx)
int media_features = -1;
int service_route_enable = -1;
int path_enable = -1;
unsigned refer_expires = -1;
unsigned refer_expires = (unsigned)-1;
int refer_with_id = -1;
int substate = -1;
......@@ -286,7 +286,7 @@ int test_nua_params(struct context *ctx)
char const *instance = "NONE";
url_string_t const *registrar = NONE;
unsigned keepalive = -1, keepalive_stream = -1;
unsigned keepalive = (unsigned)-1, keepalive_stream = (unsigned)-1;
nua_get_params(ctx->a.nua, TAG_ANY(), TAG_END());
run_a_until(ctx, nua_r_get_params, save_until_final_response);
......@@ -423,18 +423,18 @@ int test_nua_params(struct context *ctx)
sip_from_t const *from = NONE;
char const *from_str = "NONE";
unsigned retry_count = -1;
unsigned max_subscriptions = -1;
unsigned retry_count = (unsigned)-1;
unsigned max_subscriptions = (unsigned)-1;
int invite_enable = -1;
int auto_alert = -1;
int early_media = -1;
int auto_answer = -1;
int auto_ack = -1;
unsigned invite_timeout = -1;
unsigned invite_timeout = (unsigned)-1;
unsigned session_timer = -1;
unsigned min_se = -1;
unsigned session_timer = (unsigned)-1;
unsigned min_se = (unsigned)-1;
int refresher = -1;
int update_refresh = -1;
......@@ -446,7 +446,7 @@ int test_nua_params(struct context *ctx)
int media_features = -1;
int service_route_enable = -1;
int path_enable = -1;
unsigned refer_expires = -1;
unsigned refer_expires = (unsigned)-1;
int refer_with_id = -1;
int substate = -1;
......
......@@ -41,8 +41,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\..\libsofia-sip-ua\su" /I "..\..\..\libsofia-sip-ua\ipt" /I "..\..\..\libsofia-sip-ua\sresolv" /I "..\..\..\libsofia-sip-ua\bnf" /I "..\..\..\libsofia-sip-ua\url" /I "..\..\..\libsofia-sip-ua\msg" /I "..\..\..\libsofia-sip-ua\sip" /I "..\..\..\libsofia-sip-ua\nta" /I "..\..\..\libsofia-sip-ua\nua" /I "..\..\..\libsofia-sip-ua\iptsec" /I "..\..\..\libsofia-sip-ua\http" /I "..\..\..\libsofia-sip-ua\nth" /I "..\..\..\libsofia-sip-ua\nea" /I "..\..\..\libsofia-sip-ua\sdp" /I "..\..\..\libsofia-sip-ua\soa" /I "..\..\..\libsofia-sip-ua\stun" /I "..\..\..\libsofia-sip-ua\tport" /I "include" /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
# ADD BASE CPP /nologo /W4 /WX /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /YX /FD /c
# ADD CPP /nologo /MD /W4 /WX /GX /O2 /I "..\.." /I "..\..\..\libsofia-sip-ua\su" /I "..\..\..\libsofia-sip-ua\ipt" /I "..\..\..\libsofia-sip-ua\sresolv" /I "..\..\..\libsofia-sip-ua\bnf" /I "..\..\..\libsofia-sip-ua\url" /I "..\..\..\libsofia-sip-ua\msg" /I "..\..\..\libsofia-sip-ua\sip" /I "..\..\..\libsofia-sip-ua\nta" /I "..\..\..\libsofia-sip-ua\nua" /I "..\..\..\libsofia-sip-ua\iptsec" /I "..\..\..\libsofia-sip-ua\http" /I "..\..\..\libsofia-sip-ua\nth" /I "..\..\..\libsofia-sip-ua\nea" /I "..\..\..\libsofia-sip-ua\sdp" /I "..\..\..\libsofia-sip-ua\soa" /I "..\..\..\libsofia-sip-ua\stun" /I "..\..\..\libsofia-sip-ua\tport" /I "include" /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
......@@ -65,8 +65,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\libsofia-sip-ua\su" /I "..\..\..\libsofia-sip-ua\ipt" /I "..\..\..\libsofia-sip-ua\sresolv" /I "..\..\..\libsofia-sip-ua\bnf" /I "..\..\..\libsofia-sip-ua\url" /I "..\..\..\libsofia-sip-ua\msg" /I "..\..\..\libsofia-sip-ua\sip" /I "..\..\..\libsofia-sip-ua\nta" /I "..\..\..\libsofia-sip-ua\nua" /I "..\..\..\libsofia-sip-ua\iptsec" /I "..\..\..\libsofia-sip-ua\http" /I "..\..\..\libsofia-sip-ua\nth" /I "..\..\..\libsofia-sip-ua\nea" /I "..\..\..\libsofia-sip-ua\sdp" /I "..\..\..\libsofia-sip-ua\soa" /I "..\..\..\libsofia-sip-ua\stun" /I "..\..\..\libsofia-sip-ua\tport" /I "include" /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE CPP /nologo /W4 /WX /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W4 /WX /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\libsofia-sip-ua\su" /I "..\..\..\libsofia-sip-ua\ipt" /I "..\..\..\libsofia-sip-ua\sresolv" /I "..\..\..\libsofia-sip-ua\bnf" /I "..\..\..\libsofia-sip-ua\url" /I "..\..\..\libsofia-sip-ua\msg" /I "..\..\..\libsofia-sip-ua\sip" /I "..\..\..\libsofia-sip-ua\nta" /I "..\..\..\libsofia-sip-ua\nua" /I "..\..\..\libsofia-sip-ua\iptsec" /I "..\..\..\libsofia-sip-ua\http" /I "..\..\..\libsofia-sip-ua\nth" /I "..\..\..\libsofia-sip-ua\nea" /I "..\..\..\libsofia-sip-ua\sdp" /I "..\..\..\libsofia-sip-ua\soa" /I "..\..\..\libsofia-sip-ua\stun" /I "..\..\..\libsofia-sip-ua\tport" /I "include" /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -28,7 +28,7 @@
#include <fcntl.h>
#include <stdio.h>
#define write(fd, buf, len) _write((fd), (buf), (len))
#define write(fd, buf, len) _write((fd), (buf), (unsigned int)(len))
#define read(fd, buf, len) _read((fd), (buf), (len))
#define close(fd) _close((fd))
#define mktemp(template) _mktemp((template))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment