Skip to content

Commit

Permalink
[mts] Silence C++ warnings about memcpy()
Browse files Browse the repository at this point in the history
Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Aug 20, 2020
1 parent 74f63e0 commit 0fde04f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mts/protocol/mtprxcontainer.cpp
@@ -1,7 +1,9 @@
/*
* This file is part of libmeegomtp package
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (c) 2010 Nokia Corporation. All rights reserved.
* Copyright (c) 2018 - 2020 Jolla Ltd.
* Copyright (c) 2020 Open Mobile Platform LLC.
*
* Contact: Santosh Puranik <santosh.puranik@nokia.com>
*
Expand Down Expand Up @@ -207,7 +209,9 @@ MTPRxContainer& MTPRxContainer::operator>>(QVector<MtpInt128> &d)
quint32 sz = 0;
operator>>(sz);
d.resize(sz);
memcpy(d.data(), m_buffer + m_offset, (sz * sizeof(MtpInt128)));
memcpy(static_cast<void *>(d.data()),
static_cast<void *>(m_buffer + m_offset),
sz * sizeof(MtpInt128));
m_offset += sz * sizeof(MtpInt128);
return *this;
}
Expand Down

0 comments on commit 0fde04f

Please sign in to comment.