summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/amqp_rpc_sendstring_client.c2
-rw-r--r--tests/test_parse_url.c5
-rw-r--r--tests/test_tables.c10
3 files changed, 12 insertions, 5 deletions
diff --git a/examples/amqp_rpc_sendstring_client.c b/examples/amqp_rpc_sendstring_client.c
index 84e7fdd..8a16281 100644
--- a/examples/amqp_rpc_sendstring_client.c
+++ b/examples/amqp_rpc_sendstring_client.c
@@ -200,7 +200,7 @@ int main(int argc, char *argv[])
}
printf("----\n");
- body_target = frame.payload.properties.body_size;
+ body_target = (size_t)frame.payload.properties.body_size;
body_received = 0;
while (body_received < body_target) {
diff --git a/tests/test_parse_url.c b/tests/test_parse_url.c
index cb4f59d..b54ace2 100644
--- a/tests/test_parse_url.c
+++ b/tests/test_parse_url.c
@@ -36,6 +36,11 @@
#include "config.h"
+#ifdef _MSC_VER
+/* MSVC complains about strdup being deprecated in favor of _strdup */
+# define _CRT_NONSTDC_NO_DEPRECATE
+#endif
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/tests/test_tables.c b/tests/test_tables.c
index cf2509e..cc40410 100644
--- a/tests/test_tables.c
+++ b/tests/test_tables.c
@@ -34,6 +34,11 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef _MSC_VER
+# define _USE_MATH_DEFINES
+# define _CRT_SECURE_NO_WARNINGS
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -44,9 +49,6 @@
#include <amqp.h>
-#ifdef _MSC_VER
-#define _USE_MATH_DEFINES
-#endif
#include <math.h>
void die(const char *fmt, ...)
@@ -339,7 +341,7 @@ static void test_table_codec(FILE *out)
entries[12].key = amqp_cstring_bytes("float");
entries[12].value.kind = AMQP_FIELD_KIND_F32;
- entries[12].value.value.f32 = M_PI;
+ entries[12].value.value.f32 = (float)M_PI;
entries[13].key = amqp_cstring_bytes("double");
entries[13].value.kind = AMQP_FIELD_KIND_F64;