From 56e1d2214f95848745168e0af53213729437da6c Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Thu, 3 Mar 2016 16:31:57 -0700 Subject: [PATCH] grovescam: fix a couple more narrowing conversions (c++11) Signed-off-by: Jon Trulson Signed-off-by: Mihai Tudor Panu --- src/grovescam/grovescam.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/grovescam/grovescam.cxx b/src/grovescam/grovescam.cxx index 11f216b3..53bd2c01 100644 --- a/src/grovescam/grovescam.cxx +++ b/src/grovescam/grovescam.cxx @@ -248,7 +248,7 @@ bool GROVESCAM::preCapture(PIC_FORMATS_T fmt) { const unsigned int pktLen = 6; uint8_t cmd[pktLen] = { 0xaa, static_cast(0x01 | m_camAddr), 0x00, - 0x07, 0x00, fmt }; + 0x07, 0x00, static_cast(fmt) }; uint8_t resp[pktLen]; int retries = 0; @@ -285,8 +285,8 @@ bool GROVESCAM::doCapture() { const unsigned int pktLen = 6; uint8_t cmd[pktLen] = { 0xaa, static_cast(0x06 | m_camAddr), 0x08, - MAX_PKT_LEN & 0xff, - (MAX_PKT_LEN >> 8) & 0xff, 0}; + static_cast(MAX_PKT_LEN & 0xff), + static_cast((MAX_PKT_LEN >> 8)) & 0xff, 0}; uint8_t resp[pktLen]; int retries = 0;