diff options
author | Riza Sulistyo <riza@teluu.com> | 2013-07-02 11:45:57 +0000 |
---|---|---|
committer | Riza Sulistyo <riza@teluu.com> | 2013-07-02 11:45:57 +0000 |
commit | 9acdbbbbc844e603f01a4f1efb3e46ca7252df8e (patch) | |
tree | 79db88f9ae0bc212f9f90fd89fc3e177f052f502 | |
parent | 9adb4bb7f2d50e3651b9484214518c50a184e864 (diff) |
Re #1680:
- Win64 Project properties modification, using x64 as target machine.
- Fix incorrect data type which might result in unsafe code.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4550 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | build/vs/pjproject-vs8-win64-common-defaults.vsprops | 2 | ||||
-rw-r--r-- | pjlib/src/pjlib-test/ioq_tcp.c | 4 | ||||
-rw-r--r-- | pjsip/src/pjsip/sip_msg.c | 2 | ||||
-rw-r--r-- | pjsip/src/test/msg_test.c | 7 |
4 files changed, 7 insertions, 8 deletions
diff --git a/build/vs/pjproject-vs8-win64-common-defaults.vsprops b/build/vs/pjproject-vs8-win64-common-defaults.vsprops index e889d6c8..f168437c 100644 --- a/build/vs/pjproject-vs8-win64-common-defaults.vsprops +++ b/build/vs/pjproject-vs8-win64-common-defaults.vsprops @@ -11,7 +11,7 @@ <Tool Name="VCLinkerTool" SubSystem="1" - TargetMachine="1" + TargetMachine="17" /> <UserMacro Name="TargetCPU" diff --git a/pjlib/src/pjlib-test/ioq_tcp.c b/pjlib/src/pjlib-test/ioq_tcp.c index 2d6b3876..57a468cf 100644 --- a/pjlib/src/pjlib-test/ioq_tcp.c +++ b/pjlib/src/pjlib-test/ioq_tcp.c @@ -254,7 +254,7 @@ static int compliance_test_0(pj_bool_t allow_concur) pj_ioqueue_op_key_t accept_op; int bufsize = BUF_MIN_SIZE; int status = -1; - pj_ssize_t pending_op = 0; + int pending_op = 0; pj_timestamp t_elapsed; pj_str_t s; pj_status_t rc; @@ -467,7 +467,7 @@ on_error: if (ioque != NULL) pj_ioqueue_destroy(ioque); pj_pool_release(pool); - return (int)status; + return status; } diff --git a/pjsip/src/pjsip/sip_msg.c b/pjsip/src/pjsip/sip_msg.c index 597488e8..0ec56ade 100644 --- a/pjsip/src/pjsip/sip_msg.c +++ b/pjsip/src/pjsip/sip_msg.c @@ -399,7 +399,7 @@ PJ_DEF(pj_ssize_t) pjsip_msg_print( const pjsip_msg *msg, char *buf, pj_size_t size) { char *p=buf, *end=buf+size; - pj_size_t len; + pj_ssize_t len; pjsip_hdr *hdr; pj_str_t clen_hdr = { "Content-Length: ", 16}; diff --git a/pjsip/src/test/msg_test.c b/pjsip/src/test/msg_test.c index e0448462..9f694eac 100644 --- a/pjsip/src/test/msg_test.c +++ b/pjsip/src/test/msg_test.c @@ -1888,7 +1888,7 @@ static int hdr_test(void) for (i=0; i<PJ_ARRAY_SIZE(hdr_test_data); ++i) { struct hdr_test_t *test = &hdr_test_data[i]; pj_str_t hname; - pj_size_t len; + pj_ssize_t len; int parsed_len; pj_pool_t *pool; pjsip_hdr *parsed_hdr1=NULL, *parsed_hdr2=NULL; @@ -1995,8 +1995,7 @@ int msg_test(void) unsigned parse; unsigned print; } run[COUNT]; - unsigned i, max; - int avg_len; + unsigned i, max, avg_len; char desc[250]; pj_status_t status; @@ -2018,7 +2017,7 @@ int msg_test(void) /* Calculate average message length */ for (i=0, avg_len=0; i<PJ_ARRAY_SIZE(test_array); ++i) { - avg_len += (int)test_array[i].len; + avg_len += (unsigned)test_array[i].len; } avg_len /= PJ_ARRAY_SIZE(test_array); |