Fix warnings compile with clang

This commit is contained in:
John Zhao 2018-04-10 21:15:00 +08:00
parent 12dcb762e4
commit 19ee097f0a
2 changed files with 6 additions and 6 deletions

View File

@ -323,8 +323,8 @@ void Channels::XuCamCtrlSet(Option option, std::int32_t value) const {
bool Channels::XuHalfDuplexSet(Option option, xu_cmd_t cmd) const {
int id = XuHalfDuplexId(option);
std::uint8_t data[3] = {// must be 3 now
static_cast<std::uint8_t>(id & 0xFF), cmd};
std::uint8_t data[3] = {static_cast<std::uint8_t>(id & 0xFF),
static_cast<std::uint8_t>(cmd)};
if (XuControlQuery(CHANNEL_HALF_DUPLEX, uvc::XU_QUERY_SET, 3, data)) {
VLOG(2) << "XuHalfDuplexSet value (0x" << std::hex << std::uppercase << cmd
<< ") of " << option << " success";

View File

@ -172,10 +172,10 @@ struct ImuReqPacket {
: header(header), serial_number(serial_number) {}
std::array<std::uint8_t, 5> to_data() const {
return {header, static_cast<std::uint8_t>((serial_number >> 24) & 0xFF),
static_cast<std::uint8_t>((serial_number >> 16) & 0xFF),
static_cast<std::uint8_t>((serial_number >> 8) & 0xFF),
static_cast<std::uint8_t>(serial_number & 0xFF)};
return {{header, static_cast<std::uint8_t>((serial_number >> 24) & 0xFF),
static_cast<std::uint8_t>((serial_number >> 16) & 0xFF),
static_cast<std::uint8_t>((serial_number >> 8) & 0xFF),
static_cast<std::uint8_t>(serial_number & 0xFF)}};
}
};
#pragma pack(pop)