aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/Makefile.inc4
-rw-r--r--tests/libtest/lib552.c6
-rw-r--r--tests/libtest/lib571.c7
-rw-r--r--tests/libtest/testtrace.c2
4 files changed, 12 insertions, 7 deletions
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index b13c97e47..e24d74226 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -119,7 +119,7 @@ lib549_SOURCES = lib549.c $(SUPPORTFILES)
lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
-lib552_SOURCES = lib552.c $(SUPPORTFILES)
+lib552_SOURCES = lib552.c $(SUPPORTFILES) $(WARNLESS)
lib553_SOURCES = lib553.c $(SUPPORTFILES)
@@ -154,7 +154,7 @@ lib569_SOURCES = lib569.c $(SUPPORTFILES)
lib570_SOURCES = lib570.c $(SUPPORTFILES)
-lib571_SOURCES = lib571.c $(SUPPORTFILES)
+lib571_SOURCES = lib571.c $(SUPPORTFILES) $(WARNLESS)
lib572_SOURCES = lib572.c $(SUPPORTFILES)
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index fb8b14bc2..2cc942ad4 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -25,6 +25,7 @@
#include "test.h"
+#include "warnless.h"
#include "memdebug.h"
struct data {
@@ -136,7 +137,8 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
- printf("%.*s", (int)(size * nmemb), (char *)ptr);
+ int amount = curlx_uztosi(size * nmemb);
+ printf("%.*s", amount, (char *)ptr);
(void)stream;
return size * nmemb;
}
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c
index c5f7240d0..ba0aa1ce4 100644
--- a/tests/libtest/lib571.c
+++ b/tests/libtest/lib571.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -39,6 +39,7 @@
#include <curl/mprintf.h>
+#include "warnless.h"
#include "memdebug.h"
#define RTP_PKT_CHANNEL(p) ((int)((unsigned char)((p)[1])))
@@ -54,12 +55,14 @@ static int rtp_packet_count = 0;
static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream) {
char *data = (char *)ptr;
int channel = RTP_PKT_CHANNEL(data);
- int message_size = (int)(size * nmemb) - 4;
+ int message_size;
int coded_size = RTP_PKT_LENGTH(data);
size_t failure = (size * nmemb) ? 0 : 1;
int i;
(void)stream;
+ message_size = curlx_uztosi(size * nmemb) - 4;
+
printf("RTP: message size %d, channel %d\n", message_size, channel);
if(message_size != coded_size) {
printf("RTP embedded size (%d) does not match the write size (%d).\n",
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
index b13c54e30..64602e065 100644
--- a/tests/libtest/testtrace.c
+++ b/tests/libtest/testtrace.c
@@ -113,7 +113,7 @@ int libtest_debug_cb(CURL *handle, curl_infotype type,
switch (type) {
case CURLINFO_TEXT:
- fprintf(stderr, "%s== Info: %s", timestr, data);
+ fprintf(stderr, "%s== Info: %s", timestr, (char *)data);
default: /* in case a new one is introduced to shock us */
return 0;