Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSBuild warnings C4146 and C4267 #98

Merged
merged 2 commits into from
Feb 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rmw_cyclonedds_cpp/src/serdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void * create_response_type_support(
static uint32_t serdata_rmw_size(const struct ddsi_serdata * dcmn)
{
size_t size = static_cast<const serdata_rmw *>(dcmn)->size();
uint32_t size_u32(size);
uint32_t size_u32 = static_cast<uint32_t>(size);
assert(size == size_u32);
return size_u32;
}
Expand Down Expand Up @@ -504,7 +504,7 @@ void serdata_rmw::resize(size_t requested_size)

/* FIXME: CDR padding in DDSI makes me do this to avoid reading beyond the bounds
when copying data to network. Should fix Cyclone to handle that more elegantly. */
size_t n_pad_bytes = (-requested_size) % 4;
size_t n_pad_bytes = (0 - requested_size) % 4;
m_data.reset(new byte[requested_size + n_pad_bytes]);
m_size = requested_size + n_pad_bytes;

Expand Down