Use c++ style cast

Change-Id: I6394978e2cbc1a6efa9912a876f652d3d455d98b
Signed-off-by: Bin Chen <pierr.chen@gmail.com>
diff --git a/client/wrapper.cc b/client/wrapper.cc
index f9cc3dc..cf396ca 100644
--- a/client/wrapper.cc
+++ b/client/wrapper.cc
@@ -28,9 +28,10 @@
 
 // This is horrible. Get rid of it!!!
 static char** ConvertStringVectorToC(const std::vector<std::string>& strings) {
-  char** c_strings = (char**)malloc(strings.size() * sizeof(*c_strings));
+  char** c_strings =
+      static_cast<char**>(malloc(strings.size() * sizeof(*c_strings)));
   for (size_t i = 0; i < strings.size(); i++) {
-    c_strings[i] = (char*)malloc(strings[i].size() + 1);
+    c_strings[i] = static_cast<char*>(malloc(strings[i].size() + 1));
     memset(c_strings[i], 0, strings[i].size() + 1);
     strcpy(c_strings[i], strings[i].c_str());
   }
diff --git a/daemon/i2c_driver_i2cdev.cc b/daemon/i2c_driver_i2cdev.cc
index b4f2280..acc02ac 100644
--- a/daemon/i2c_driver_i2cdev.cc
+++ b/daemon/i2c_driver_i2cdev.cc
@@ -59,7 +59,7 @@
   if (fd < 0)
     return false;
   uintptr_t tmp_addr = address;
-  if (char_interface_->Ioctl(fd, I2C_SLAVE, (void*)tmp_addr) < 0) {
+  if (char_interface_->Ioctl(fd, I2C_SLAVE, reinterpret_cast<void*>(tmp_addr)) < 0) {
     LOG(ERROR) << "Failed to set I2C slave";
     char_interface_->Close(fd);
     return false;
diff --git a/example/pio_mcp9808.cc b/example/pio_mcp9808.cc
index 446afbf..cad8990 100644
--- a/example/pio_mcp9808.cc
+++ b/example/pio_mcp9808.cc
@@ -50,7 +50,7 @@
 
   val = ntohs(val);
   float temp = (val >> 4) & 0xFF;
-  temp += (float)(val & 0xF) / 16;
+  temp += static_cast<float>(val & 0xF) / 16;
   printf("Temp: %f\n", temp);
 
   BI2cDevice_delete(i2c_device);