Mercurial > hg > beaglert
changeset 216:869f5e703844
Fixed compiler warnings
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sat, 13 Feb 2016 01:51:01 +0000 |
parents | b10f5ba8fd33 |
children | c42a6b4dc2d4 3d41a6fa1830 |
files | core/I2c_Codec.cpp include/Midi.h |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core/I2c_Codec.cpp Sat Feb 13 01:45:21 2016 +0000 +++ b/core/I2c_Codec.cpp Sat Feb 13 01:51:01 2016 +0000 @@ -414,7 +414,7 @@ // Write a specific register on the codec int I2c_Codec::writeRegister(unsigned int reg, unsigned int value) { - char buf[2] = { reg & 0xFF, value & 0xFF }; + char buf[2] = { static_cast<char>(reg & 0xFF), static_cast<char>(value & 0xFF) }; if(write(i2C_file, buf, 2) != 2) {
--- a/include/Midi.h Sat Feb 13 01:45:21 2016 +0000 +++ b/include/Midi.h Sat Feb 13 01:51:01 2016 +0000 @@ -63,7 +63,7 @@ void prettyPrint(){ rt_printf("MessageType: %x, ", this->getType()); rt_printf("channel: %u, ", this->getChannel()); - for(int n = 0; n < this->getNumDataBytes(); n++){ + for(unsigned int n = 0; n < this->getNumDataBytes(); n++){ rt_printf("data%d: %d, ", n + 1, this->getDataByte(n)); } rt_printf("\n");