Merge "Fix printf warnings"
am: dabf66d32d

Change-Id: I59bd180e643e13d08a27e808228446f68cd44c83
diff --git a/AK8975_FS/akmdfs/AKFS_Measure.c b/AK8975_FS/akmdfs/AKFS_Measure.c
index 849c921..efb73f4 100644
--- a/AK8975_FS/akmdfs/AKFS_Measure.c
+++ b/AK8975_FS/akmdfs/AKFS_Measure.c
@@ -16,6 +16,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include <inttypes.h>
+
 #ifdef WIN32
 #include "AK8975_LinuxDriver.h"
 #else
@@ -207,7 +210,8 @@
 		AKMERROR;
 		return AKM_FAIL;
 	}
-	AKMDATA(AKMDATA_GETINTERVAL,"delay[A,M,O]=%lld,%lld,%lld\n",
+	AKMDATA(AKMDATA_GETINTERVAL,
+		"delay[A,M,O]=%" PRIi64 ",%" PRIi64 ",%" PRIi64 "\n",
 		delay[0], delay[1], delay[2]);
 
 	/* update */
diff --git a/AK8975_FS/libsensors/AkmSensor.cpp b/AK8975_FS/libsensors/AkmSensor.cpp
index bcbd445..3351fbf 100644
--- a/AK8975_FS/libsensors/AkmSensor.cpp
+++ b/AK8975_FS/libsensors/AkmSensor.cpp
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <inttypes.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <math.h>
@@ -139,9 +140,9 @@
 	char buffer[32];
 	int bytes;
 
-    if (ns < -1 || 2147483647 < ns) {
-		ALOGE("AkmSensor: invalid delay (%lld)", ns);
-        return -EINVAL;
+	if (ns < -1 || 2147483647 < ns) {
+		ALOGE("AkmSensor: invalid delay (%" PRIi64 ")", ns);
+		return -EINVAL;
 	}
 
     switch (id) {
@@ -160,7 +161,7 @@
     }
 
 	if (ns != mDelay[id]) {
-   		bytes = sprintf(buffer, "%lld", ns);
+		bytes = sprintf(buffer, "%" PRIi64, ns);
 		err = write_sys_attribute(input_sysfs_path, buffer, bytes);
 		if (err == 0) {
 			mDelay[id] = ns;