From 668099522bb4142bd9d625ebd8728df7128e03fd Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Thu, 2 Jun 2016 11:18:07 -0700 Subject: [PATCH] fix warnings on Windows --- rmw_fastrtps_cpp/src/TypeSupport.cpp | 2 +- rmw_fastrtps_cpp/src/functions.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rmw_fastrtps_cpp/src/TypeSupport.cpp b/rmw_fastrtps_cpp/src/TypeSupport.cpp index f43614573..c20bc24e2 100644 --- a/rmw_fastrtps_cpp/src/TypeSupport.cpp +++ b/rmw_fastrtps_cpp/src/TypeSupport.cpp @@ -246,7 +246,7 @@ bool TypeSupport::serializeROSmessage(eprosima::fastcdr::Cdr &ser, const rosidl_ // Control maximum length. if((member->string_upper_bound_ && str.length() > member->string_upper_bound_ + 1) || str.length() > 256) { - printf("string overcomes the maximum length with length %lu\n", str.length()); + printf("string overcomes the maximum length with length %zu\n", str.length()); throw std::runtime_error("string overcomes the maximum length"); } ser << str; diff --git a/rmw_fastrtps_cpp/src/functions.cpp b/rmw_fastrtps_cpp/src/functions.cpp index 3dded1669..788235326 100644 --- a/rmw_fastrtps_cpp/src/functions.cpp +++ b/rmw_fastrtps_cpp/src/functions.cpp @@ -301,7 +301,7 @@ extern "C" FastRTPSNodeImpl * node_impl = nullptr; try { node_impl = new FastRTPSNodeImpl(); - } catch(std::bad_alloc & exc) { + } catch(std::bad_alloc) { RMW_SET_ERROR_MSG("failed to allocate node impl struct"); return NULL; }