You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2020/08/18 15:05:08 UTC

[qpid-proton] branch master updated: PROTON-2265: Fix cmake builds with old cmake version (2.8.12) - Fixed some compile warnings that error out on gcc 4.4 - Fixed some incorrect printf formatting codes causing Visual Studio warnings

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new 9352e93  PROTON-2265: Fix cmake builds with old cmake version (2.8.12) - Fixed some compile warnings that error out on gcc 4.4 - Fixed some incorrect printf formatting codes causing Visual Studio warnings
9352e93 is described below

commit 9352e936200a55e5485b04f80cba68f3bf0eaf8c
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Tue Aug 18 10:31:23 2020 -0400

    PROTON-2265: Fix cmake builds with old cmake version (2.8.12)
    - Fixed some compile warnings that error out on gcc 4.4
    - Fixed some incorrect printf formatting codes causing Visual Studio warnings
---
 c/CMakeLists.txt                | 73 ++++++++++++++++++++++++-----------------
 c/examples/raw_echo.c           |  6 ++--
 c/tests/CMakeLists.txt          |  3 +-
 c/tests/raw_connection_test.cpp | 48 +++++++++++++--------------
 4 files changed, 70 insertions(+), 60 deletions(-)

diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
index 9e224de..b0c3937 100644
--- a/c/CMakeLists.txt
+++ b/c/CMakeLists.txt
@@ -397,8 +397,7 @@ add_library (qpid-proton-core-objects OBJECT ${qpid-proton-core-src})
 add_dependencies (qpid-proton-core-objects generated_c_files)
 set_target_properties(qpid-proton-core-objects PROPERTIES
   POSITION_INDEPENDENT_CODE ON
-  COMPILE_FLAGS "${LTO}"
-  LINK_FLAGS "${LINK_LTO}")
+  COMPILE_FLAGS "${LTO}")
 target_compile_definitions(qpid-proton-core-objects PRIVATE qpid_proton_core_EXPORTS)
 
 # Can't use target_link_libraries() because cmake 2.8.12 doesn't allow object libraries as the first param
@@ -412,8 +411,7 @@ add_library (qpid-proton-platform-io-objects OBJECT ${qpid-proton-platform-io})
 set_target_properties(qpid-proton-platform-io-objects PROPERTIES
   POSITION_INDEPENDENT_CODE ON
   C_EXTENSIONS ON
-  COMPILE_FLAGS "${LTO}"
-  LINK_FLAGS "${LINK_LTO}")
+  COMPILE_FLAGS "${LTO}")
 target_compile_definitions(qpid-proton-platform-io-objects PRIVATE qpid_proton_EXPORTS)
 
 target_compile_definitions(qpid-proton-platform-io-objects PRIVATE $<TARGET_PROPERTY:qpid-proton,COMPILE_DEFINITIONS>)
@@ -426,6 +424,7 @@ set_target_properties (qpid-proton-core
   PROPERTIES
   VERSION   "${PN_LIB_CORE_VERSION}"
   SOVERSION "${PN_LIB_CORE_MAJOR_VERSION}"
+  COMPILE_FLAGS "${LTO}"
   LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}"
 )
 
@@ -435,15 +434,49 @@ if (BUILD_STATIC_LIBS)
   target_link_libraries (qpid-proton-core-static ${SSL_LIB} ${SASL_LIB} ${PLATFORM_LIBS})
 endif(BUILD_STATIC_LIBS)
 
+if (qpid-proton-proactor)
+  set(HAS_PROACTOR True)
+  set_source_files_properties (${qpid-proton-proactor} PROPERTIES
+    COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${C_STANDARD_FLAGS}"
+    )
+
+  add_library (qpid-proton-proactor-objects OBJECT ${qpid-proton-proactor})
+  set_target_properties(qpid-proton-proactor-objects PROPERTIES
+    POSITION_INDEPENDENT_CODE ON
+  COMPILE_FLAGS "${LTO}")
+  target_compile_definitions(qpid-proton-proactor-objects PRIVATE qpid_proton_proactor_EXPORTS)
+
+  # Can't use target_link_libraries() because cmake 2.8.12 doesn't allow object libraries as the first param
+  # otherwise for cmake 3.9 and on this would be:
+  #   target_link_libraries (qpid-proton-proactor-objects ${PLATFORM_LIBS} ${PROACTOR_LIBS})
+  target_compile_definitions(qpid-proton-proactor-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-proactor,COMPILE_DEFINITIONS>)
+  target_compile_options    (qpid-proton-proactor-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-proactor,COMPILE_OPTIONS>)
+  target_include_directories(qpid-proton-proactor-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-proactor,INCLUDE_DIRECTORIES>)
+
+  add_library (qpid-proton-proactor SHARED $<TARGET_OBJECTS:qpid-proton-proactor-objects>)
+  target_link_libraries (qpid-proton-proactor  LINK_PUBLIC qpid-proton-core)
+  target_link_libraries (qpid-proton-proactor  LINK_PRIVATE ${PLATFORM_LIBS} ${PROACTOR_LIBS})
+  set_target_properties (qpid-proton-proactor
+    PROPERTIES
+    VERSION   "${PN_LIB_PROACTOR_VERSION}"
+    SOVERSION "${PN_LIB_PROACTOR_MAJOR_VERSION}"
+    LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}"
+    COMPILE_FLAGS "${LTO}"
+    )
+  if (BUILD_STATIC_LIBS)
+    add_library (qpid-proton-proactor-static STATIC ${qpid-proton-proactor})
+    target_compile_definitions(qpid-proton-proactor-static PUBLIC PROTON_DECLARE_STATIC)
+    target_link_libraries (qpid-proton-proactor-static ${PLATFORM_LIBS} ${PROACTOR_LIBS})
+  endif(BUILD_STATIC_LIBS)
+endif()
+
 set(qpid-proton-noncore-src
-  # Proactor
-  ${qpid-proton-proactor}
   # Proton Reactor/Messenger
   ${qpid-proton-extra}
   ${qpid-proton-include-extra}
 )
 
-add_library (qpid-proton SHARED $<TARGET_OBJECTS:qpid-proton-core-objects> $<TARGET_OBJECTS:qpid-proton-platform-io-objects> ${qpid-proton-noncore-src})
+add_library (qpid-proton SHARED $<TARGET_OBJECTS:qpid-proton-core-objects> $<TARGET_OBJECTS:qpid-proton-platform-io-objects> $<TARGET_OBJECTS:qpid-proton-proactor-objects> ${qpid-proton-noncore-src})
 target_link_libraries (qpid-proton LINK_PRIVATE ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS} ${PROACTOR_LIBS})
 set_target_properties (qpid-proton
   PROPERTIES
@@ -457,33 +490,11 @@ if (BUILD_STATIC_LIBS)
   add_library (qpid-proton-platform-io-static OBJECT ${qpid-proton-platform-io})
   set_target_properties(qpid-proton-platform-io-static PROPERTIES
     C_EXTENSIONS ON)
-  add_library(qpid-proton-static STATIC ${qpid-proton-core-src} $<TARGET_OBJECTS:qpid-proton-platform-io-static> ${qpid-proton-noncore-src})
+  add_library(qpid-proton-static STATIC $<TARGET_OBJECTS:qpid-proton-platform-io-static> ${qpid-proton-noncore-src})
   target_compile_definitions(qpid-proton-static PUBLIC PROTON_DECLARE_STATIC)
-  target_link_libraries (qpid-proton-static ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS} ${PROACTOR_LIBS})
+  target_link_libraries (qpid-proton-static qpid-proton-core-static qpid-proton-proactor-static ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS} ${PROACTOR_LIBS})
 endif(BUILD_STATIC_LIBS)
 
-if (qpid-proton-proactor)
-  set(HAS_PROACTOR True)
-  set_source_files_properties (${qpid-proton-proactor} PROPERTIES
-    COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${C_STANDARD_FLAGS}"
-    )
-  add_library (qpid-proton-proactor SHARED ${qpid-proton-proactor})
-  target_link_libraries (qpid-proton-proactor  LINK_PUBLIC qpid-proton-core)
-  target_link_libraries (qpid-proton-proactor  LINK_PRIVATE ${PLATFORM_LIBS} ${PROACTOR_LIBS})
-  set_target_properties (qpid-proton-proactor
-    PROPERTIES
-    VERSION   "${PN_LIB_PROACTOR_VERSION}"
-    SOVERSION "${PN_LIB_PROACTOR_MAJOR_VERSION}"
-    LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}"
-    COMPILE_FLAGS "${LTO}"
-    )
-  if (BUILD_STATIC_LIBS)
-    add_library (qpid-proton-proactor-static STATIC ${qpid-proton-proactor})
-    target_compile_definitions(qpid-proton-proactor-static PUBLIC PROTON_DECLARE_STATIC)
-    target_link_libraries (qpid-proton-proactor-static ${PLATFORM_LIBS} ${PROACTOR_LIBS})
-  endif(BUILD_STATIC_LIBS)
-endif()
-
 # Install executables and libraries
 if (BUILD_STATIC_LIBS)
   set(STATIC_LIBS qpid-proton-static qpid-proton-core-static)
diff --git a/c/examples/raw_echo.c b/c/examples/raw_echo.c
index 53a4ada..57e5ab0 100644
--- a/c/examples/raw_echo.c
+++ b/c/examples/raw_echo.c
@@ -119,7 +119,7 @@ static void handle_receive(app_data_t *app, pn_event_t* event) {
       pn_raw_buffer_t buffers[READ_BUFFERS] = {{0}};
       if (cd) {
         int i = READ_BUFFERS;
-        printf("**raw connection %ld connected\n", cd-conn_data);
+        printf("**raw connection %tu connected\n", cd-conn_data);
         app->connects++;
         for (; i; --i) {
           pn_raw_buffer_t *buff = &buffers[READ_BUFFERS-i];
@@ -137,14 +137,14 @@ static void handle_receive(app_data_t *app, pn_event_t* event) {
     case PN_RAW_CONNECTION_WAKE: {
       pn_raw_connection_t *c = pn_event_raw_connection(event);
       conn_data_t *cd = (conn_data_t *) pn_raw_connection_get_context(c);
-      printf("**raw connection %ld woken\n", cd-conn_data);
+      printf("**raw connection %tu woken\n", cd-conn_data);
     } break;
 
     case PN_RAW_CONNECTION_DISCONNECTED: {
       pn_raw_connection_t *c = pn_event_raw_connection(event);
       conn_data_t *cd = (conn_data_t *) pn_raw_connection_get_context(c);
       if (cd) {
-        printf("**raw connection %ld disconnected: bytes: %d, buffers: %d\n", cd-conn_data, cd->bytes, cd->buffers);
+        printf("**raw connection %tu disconnected: bytes: %d, buffers: %d\n", cd-conn_data, cd->bytes, cd->buffers);
       } else {
         printf("**raw connection disconnected: not connected\n");
       }
diff --git a/c/tests/CMakeLists.txt b/c/tests/CMakeLists.txt
index 3417304..812b0f4 100644
--- a/c/tests/CMakeLists.txt
+++ b/c/tests/CMakeLists.txt
@@ -75,8 +75,7 @@ if (CMAKE_CXX_COMPILER)
     add_c_test(c-proactor-test pn_test_proactor.cpp proactor_test.cpp)
     target_link_libraries(c-proactor-test qpid-proton-core qpid-proton-proactor ${PLATFORM_LIBS})
 
-    list(TRANSFORM qpid-proton-proactor PREPEND "../" OUTPUT_VARIABLE qpid-proton-proactor-src)
-    add_c_test(c-raw-connection-test raw_connection_test.cpp ${qpid-proton-proactor-src})
+    add_c_test(c-raw-connection-test raw_connection_test.cpp $<TARGET_OBJECTS:qpid-proton-proactor-objects>)
     target_link_libraries(c-raw-connection-test qpid-proton-core ${PLATFORM_LIBS} ${PROACTOR_LIBS})
 
     add_c_test(c-ssl-proactor-test pn_test_proactor.cpp ssl_proactor_test.cpp)
diff --git a/c/tests/raw_connection_test.cpp b/c/tests/raw_connection_test.cpp
index d32103b..1ddc977 100644
--- a/c/tests/raw_connection_test.cpp
+++ b/c/tests/raw_connection_test.cpp
@@ -333,9 +333,9 @@ TEST_CASE("raw connection") {
   CHECK_FALSE(pn_raw_connection_is_read_closed(p));
   CHECK_FALSE(pn_raw_connection_is_write_closed(p));
 
-  int rbuff_count = pn_raw_connection_read_buffers_capacity(p);
+  size_t rbuff_count = pn_raw_connection_read_buffers_capacity(p);
   CHECK(rbuff_count>0);
-  int wbuff_count = pn_raw_connection_write_buffers_capacity(p);
+  size_t wbuff_count = pn_raw_connection_write_buffers_capacity(p);
   CHECK(wbuff_count>0);
 
   BufferAllocator rb(rbuffer_memory, sizeof(rbuffer_memory));
@@ -344,12 +344,12 @@ TEST_CASE("raw connection") {
   rb.split_buffers(rbuffs);
   wb.split_buffers(wbuffs);
 
-  int rtaken = pn_raw_connection_give_read_buffers(p, rbuffs, RBUFFCOUNT);
+  size_t rtaken = pn_raw_connection_give_read_buffers(p, rbuffs, RBUFFCOUNT);
   REQUIRE(pni_raw_validate(p));
   REQUIRE(rtaken==rbuff_count);
 
   SECTION("Write multiple per event loop") {
-    int wtaken = 0;
+    size_t wtaken = 0;
     for (size_t i = 0; i < WBUFFCOUNT; ++i) {
       int taken = pn_raw_connection_write_buffers(p, &wbuffs[i], 1);
       if (taken==0) break;
@@ -380,7 +380,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pni_raw_validate(p));
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_WRITTEN);
         CHECK(pn_raw_connection_write_buffers_capacity(p) == 0);
-        int wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
+        size_t wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(wgiven==wtaken);
 
@@ -412,7 +412,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_READ);
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_EVENT_NONE);
         CHECK(pn_raw_connection_read_buffers_capacity(p) == 0);
-        int rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
+        size_t rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(rgiven > 0);
 
@@ -420,7 +420,7 @@ TEST_CASE("raw connection") {
 
         // At this point we should have read everything - make sure it matches
         char* start = message;
-        for (int i = 0; i < rgiven; ++i) {
+        for (size_t i = 0; i < rgiven; ++i) {
           CHECK(read[i].size > 0);
           CHECK(std::string(read[i].bytes, read[i].size) == std::string(start, read[i].size));
           start += read[i].size;
@@ -429,7 +429,7 @@ TEST_CASE("raw connection") {
       }
       SECTION("Write then read, short writes") {
         max_send_size = 10;
-        int wgiven = 0;
+        size_t wgiven = 0;
         do {
           do {
             pni_raw_write(p, fds[0], snd, set_write_error);
@@ -437,7 +437,7 @@ TEST_CASE("raw connection") {
             REQUIRE(pni_raw_validate(p));
           } while (pn_event_type(pni_raw_event_next(p)) != PN_RAW_CONNECTION_WRITTEN);
           CHECK(pn_raw_connection_write_buffers_capacity(p) == wgiven);
-          int given = pn_raw_connection_take_written_buffers(p, &written[wgiven], written.size()-wgiven);
+          size_t given = pn_raw_connection_take_written_buffers(p, &written[wgiven], written.size()-wgiven);
           REQUIRE(pni_raw_validate(p));
           CHECK(given == 1);
           CHECK(written[wgiven].offset == wbuffs[wgiven].offset);
@@ -475,7 +475,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_READ);
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_EVENT_NONE);
         CHECK(pn_raw_connection_read_buffers_capacity(p) == 0);
-        int rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
+        size_t rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(rgiven > 0);
 
@@ -483,7 +483,7 @@ TEST_CASE("raw connection") {
 
         // At this point we should have read everything - make sure it matches
         char* start = message;
-        for (int i = 0; i < rgiven; ++i) {
+        for (size_t i = 0; i < rgiven; ++i) {
           CHECK(read[i].size > 0);
           CHECK(std::string(read[i].bytes, read[i].size) == std::string(start, read[i].size));
           start += read[i].size;
@@ -495,7 +495,7 @@ TEST_CASE("raw connection") {
   }
 
   SECTION("Write once per event loop") {
-    int wtaken = pn_raw_connection_write_buffers(p, wbuffs, WBUFFCOUNT);
+    size_t wtaken = pn_raw_connection_write_buffers(p, wbuffs, WBUFFCOUNT);
     REQUIRE(pni_raw_validate(p));
     CHECK(wtaken==wbuff_count);
 
@@ -507,10 +507,10 @@ TEST_CASE("raw connection") {
 
     SECTION("Check no change in buffer use without read/write") {
 
-      int rgiven = pn_raw_connection_take_read_buffers(p, &read[0], rtaken);
+      size_t rgiven = pn_raw_connection_take_read_buffers(p, &read[0], rtaken);
       REQUIRE(pni_raw_validate(p));
       CHECK(rgiven==0);
-      int wgiven = pn_raw_connection_take_written_buffers(p, &written[0], wtaken);
+      size_t wgiven = pn_raw_connection_take_written_buffers(p, &written[0], wtaken);
       REQUIRE(pni_raw_validate(p));
       CHECK(wgiven==0);
     }
@@ -558,7 +558,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pni_raw_validate(p));
         CHECK(pn_raw_connection_write_buffers_capacity(p) == 0);
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_WRITTEN);
-        int wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
+        size_t wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
         REQUIRE(pni_raw_validate(p));
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_NEED_WRITE_BUFFERS);
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_EVENT_NONE);
@@ -570,7 +570,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pni_raw_validate(p));
         CHECK(pn_raw_connection_read_buffers_capacity(p) == 0);
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_READ);
-        int rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
+        size_t rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(rgiven > 0);
         CHECK(pn_raw_connection_read_buffers_capacity(p) == rgiven);
@@ -596,7 +596,7 @@ TEST_CASE("raw connection") {
         CHECK(read_err == 0);
         REQUIRE(pni_raw_validate(p));
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_READ);
-        int rgiven_before = rgiven;
+        size_t rgiven_before = rgiven;
         rgiven += pn_raw_connection_take_read_buffers(p, &read[rgiven], read.size()-rgiven);
         REQUIRE(pni_raw_validate(p));
         CHECK(rgiven > rgiven_before);
@@ -606,7 +606,7 @@ TEST_CASE("raw connection") {
 
         // At this point we should have read everything - make sure it matches
         char* start = message;
-        for (int i = 0; i < rgiven; ++i) {
+        for (size_t i = 0; i < rgiven; ++i) {
           CHECK(read[i].size > 0);
           CHECK(std::string(read[i].bytes, read[i].size) == std::string(start, read[i].size));
           start += read[i].size;
@@ -620,7 +620,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pni_raw_validate(p));
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_WRITTEN);
         CHECK(pn_raw_connection_write_buffers_capacity(p) == 0);
-        int wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
+        size_t wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(wgiven==wtaken);
 
@@ -648,7 +648,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_READ);
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_EVENT_NONE);
         CHECK(pn_raw_connection_read_buffers_capacity(p) == 0);
-        int rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
+        size_t rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(rgiven > 0);
 
@@ -656,7 +656,7 @@ TEST_CASE("raw connection") {
 
         // At this point we should have read everything - make sure it matches
         char* start = message;
-        for (int i = 0; i < rgiven; ++i) {
+        for (size_t i = 0; i < rgiven; ++i) {
           CHECK(read[i].size > 0);
           CHECK(std::string(read[i].bytes, read[i].size) == std::string(start, read[i].size));
           start += read[i].size;
@@ -670,7 +670,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pni_raw_validate(p));
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_WRITTEN);
         CHECK(pn_raw_connection_write_buffers_capacity(p) == 0);
-        int wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
+        size_t wgiven = pn_raw_connection_take_written_buffers(p, &written[0], written.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(wgiven==wtaken);
 
@@ -700,7 +700,7 @@ TEST_CASE("raw connection") {
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_RAW_CONNECTION_CLOSED_READ);
         REQUIRE(pn_event_type(pni_raw_event_next(p)) == PN_EVENT_NONE);
         CHECK(pn_raw_connection_read_buffers_capacity(p) == 0);
-        int rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
+        size_t rgiven = pn_raw_connection_take_read_buffers(p, &read[0], read.size());
         REQUIRE(pni_raw_validate(p));
         CHECK(rgiven > 0);
 
@@ -709,7 +709,7 @@ TEST_CASE("raw connection") {
 
         // At this point we should have read everything - make sure it matches
         char* start = message;
-        for (int i = 0; i < rgiven-1; ++i) {
+        for (size_t i = 0; i < rgiven-1; ++i) {
           CHECK(read[i].size > 0);
           CHECK(std::string(read[i].bytes, read[i].size) == std::string(start, read[i].size));
           start += read[i].size;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org