Commit 9027551f authored by Michael Jerris's avatar Michael Jerris

Fix warnings when compiling with MSVC 2005 at warning level 3

darcs-hash:20060824165414-11237-cacab8f80a76d322cdf18d23cef1e38a6de4d15a.gz
parent 01317c2c
......@@ -257,7 +257,7 @@ void nua_stack_authorize(nua_t *nua,
tl_gets(tags,
NEATAG_SUB_REF(sub),
NUTAG_SUBSTATE_REF(state),
NUTAG_SUBSTATE_REF((int)state),
TAG_END());
if (sub && state > 0) {
......
......@@ -567,7 +567,7 @@ sip_route_is_loose(sip_route_t const *r)
* Reverse a route header (Route, Record-Route, Path, Service-Route).
*/
sip_route_t *sip_route_reverse_as(su_home_t *home,
msg_hclass_t const *hc,
msg_hclass_t *hc,
sip_route_t const *route)
{
sip_route_t *reverse = NULL;
......@@ -622,7 +622,7 @@ sip_route_t *sip_route_reverse(su_home_t *home, sip_route_t const *route)
*
*/
sip_route_t *sip_route_fixdup_as(su_home_t *home,
msg_hclass_t const *hc,
msg_hclass_t *hc,
sip_route_t const *route)
{
sip_route_t *copy = NULL;
......
......@@ -108,10 +108,10 @@ SOFIAPUBFUN sip_route_t *sip_route_fixdup(su_home_t *, sip_route_t const *);
SOFIAPUBFUN sip_route_t *sip_route_fix(sip_route_t *route);
SOFIAPUBFUN sip_route_t *sip_route_fixdup_as(su_home_t *,
msg_hclass_t const *,
msg_hclass_t *,
sip_route_t const *);
SOFIAPUBFUN sip_route_t *sip_route_reverse_as(su_home_t *,
msg_hclass_t const *,
msg_hclass_t *,
sip_route_t const *);
SOFIAPUBFUN sip_via_t *sip_via_remove(msg_t *msg, sip_t *sip);
......
......@@ -91,6 +91,7 @@ struct sockaddr_storage {
#include <sofia-sip/su_alloc.h>
#include <sofia-sip/su_strlst.h>
#include <sofia-sip/su_errno.h>
#include <sofia-sip/su.h>
#include "sofia-sip/htable.h"
......@@ -1837,9 +1838,13 @@ static int sres_parse_win32_reg(sres_config_t *c)
#define MAX_VALUE_NAME_LEN 16383
su_home_t *home = c->c_home;
HKEY key_handle, interface_key_handle;
HKEY key_handle;
#if 0
HKEY interface_key_handle;
FILETIME ftime;
int index, i, found = 0;
int index, i;
#endif
int found = 0;
char *interface_guid = su_alloc(home, MAX_VALUE_NAME_LEN);
#if __MINGW32__
DWORD guid_size = QUERY_DATALEN;
......@@ -2625,7 +2630,7 @@ void sres_resolver_timer(sres_resolver_t *res, int dummy)
continue;
/* Exponential backoff */
retry_time = q->q_timestamp + (1 << q->q_retry_count);
retry_time = q->q_timestamp + ((time_t)1 << q->q_retry_count);
if (now < retry_time)
continue;
......
......@@ -33,9 +33,7 @@
*
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef USE_TURN
#include "../turn/turn_common.h"
......@@ -491,10 +489,12 @@ int stun_encode_type_len(stun_attr_t *attr, uint16_t len) {
int stun_validate_message_integrity(stun_msg_t *msg, stun_buffer_t *pwd)
{
#if defined(HAVE_OPENSSL)
int padded_len, len;
unsigned int dig_len;
unsigned char dig[20]; /* received sha1 digest */
unsigned char *padded_text;
#endif
/* password NULL so shared-secret not established and
messege integrity checks can be skipped */
......
......@@ -68,7 +68,9 @@ SOFIA_BEGIN_DECLS
/* Use macros defined in <su_configure_win32.h> */
/** Integer large enough for pointers */
#ifndef _INTPTR_T_DEFINED
typedef SU_INTPTR_T intptr_t;
#endif
/** 64-bit unsigned integer */
typedef SU_U64_T uint64_t;
/** 64-bit signed integer */
......
......@@ -257,7 +257,7 @@ strtoull(string, endPtr, base)
*/
if (negative) {
result = (unsigned longlong)-result;
result = (unsigned longlong)(-((longlong)result));
}
if (endPtr != 0) {
......
......@@ -448,4 +448,12 @@
#pragma warning( disable : 4090 4204 4244 4018 4514 4706 4761)
/* VC does not grok const */
#pragma warning( disable : 4022 4028 )
#if (_MSC_VER >= 1400) // VC8+
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
#ifndef _CRT_NONSTDC_NO_DEPRECATE
#define _CRT_NONSTDC_NO_DEPRECATE
#endif
#endif // VC8+
#endif
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