diff core/I2c_Codec.cpp @ 216:869f5e703844

Fixed compiler warnings
author Giulio Moro <giuliomoro@yahoo.it>
date Sat, 13 Feb 2016 01:51:01 +0000
parents 4c5acd649d46
children 838a4a4a8580
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)
 	{