summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-11-04 08:08:33 -0600
committerZiyan <jaraidaniel@gmail.com>2016-01-17 22:40:59 +0100
commitc8cd55c6008161825ff6df515da945d4fa41437c (patch)
treef6d1972f7936cf45dde6aee68c83fd2531fc1911
parent06aee9d0577df6bb01473339bcc505820bddc802 (diff)
downloaddevice_samsung_tuna-c8cd55c6008161825ff6df515da945d4fa41437c.zip
device_samsung_tuna-c8cd55c6008161825ff6df515da945d4fa41437c.tar.gz
device_samsung_tuna-c8cd55c6008161825ff6df515da945d4fa41437c.tar.bz2
invensense: Build with -Wall -Werror.
-rw-r--r--invensense/mlsdk/Android.mk2
-rw-r--r--invensense/mlsdk/mllite/accel.c2
-rw-r--r--invensense/mlsdk/mllite/dmpDefault.c3
-rw-r--r--invensense/mlsdk/mllite/ml.c1
-rw-r--r--invensense/mlsdk/mllite/mlFIFO.c2
-rw-r--r--invensense/mlsdk/mllite/mldl.c4
-rw-r--r--invensense/mlsdk/platform/linux/mlsl_linux_mpu.c8
7 files changed, 13 insertions, 9 deletions
diff --git a/invensense/mlsdk/Android.mk b/invensense/mlsdk/Android.mk
index 25e0907..e57d2e5 100644
--- a/invensense/mlsdk/Android.mk
+++ b/invensense/mlsdk/Android.mk
@@ -7,6 +7,7 @@ LOCAL_MODULE := libmlplatform
LOCAL_CFLAGS := -D_REENTRANT -DLINUX -DANDROID
LOCAL_CFLAGS += -DCONFIG_MPU_SENSORS_MPU3050
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/platform/include \
@@ -31,6 +32,7 @@ LOCAL_CFLAGS := -DNDEBUG -D_REENTRANT -DLINUX -DANDROID
LOCAL_CFLAGS += -DCONFIG_MPU_SENSORS_MPU3050
LOCAL_CFLAGS += -DUNICODE -D_UNICODE -DSK_RELEASE
LOCAL_CFLAGS += -DI2CDEV=\"/dev/mpu\"
+LOCAL_CFLAGS += -Wall -Werror
# optionally apply the compass filter. this is set in
# BoardConfig.mk
diff --git a/invensense/mlsdk/mllite/accel.c b/invensense/mlsdk/mllite/accel.c
index 89d5080..b8a0ed2 100644
--- a/invensense/mlsdk/mllite/accel.c
+++ b/invensense/mlsdk/mllite/accel.c
@@ -133,7 +133,7 @@ inv_error_t inv_get_accel_data(long *data)
inv_error_t result;
unsigned char raw_data[2 * ACCEL_NUM_AXES];
long tmp[ACCEL_NUM_AXES];
- int ii;
+ unsigned int ii;
signed char *mtx = mldl_cfg->pdata->accel.orientation;
char accelId = mldl_cfg->accel->id;
diff --git a/invensense/mlsdk/mllite/dmpDefault.c b/invensense/mlsdk/mllite/dmpDefault.c
index e311d6d..b649c0d 100644
--- a/invensense/mlsdk/mllite/dmpDefault.c
+++ b/invensense/mlsdk/mllite/dmpDefault.c
@@ -37,6 +37,7 @@
#include "mpu.h"
#include "mldl.h"
#include "mldl_cfg.h"
+#include "accel.h"
#define CFG_25 703
#define CFG_24 699
@@ -306,7 +307,7 @@ static unsigned short inv_setup_dmpGetAddress(unsigned short key)
{
static int isSorted = 0;
if ( !isSorted ) {
- int kk;
+ unsigned short kk;
for (kk=0; kk<NUM_KEYS; ++kk) {
keys[ kk ].addr = 0xffff;
keys[ kk ].key = kk;
diff --git a/invensense/mlsdk/mllite/ml.c b/invensense/mlsdk/mllite/ml.c
index 3328edd..5ee91d0 100644
--- a/invensense/mlsdk/mllite/ml.c
+++ b/invensense/mlsdk/mllite/ml.c
@@ -64,6 +64,7 @@
#include "mlsl.h"
#include "mlos.h"
#include "mlBiasNoMotion.h"
+#include "mlSetGyroBias.h"
#include "log.h"
#undef MPL_LOG_TAG
#define MPL_LOG_TAG "MPL-ml"
diff --git a/invensense/mlsdk/mllite/mlFIFO.c b/invensense/mlsdk/mllite/mlFIFO.c
index 457b0f4..221e72d 100644
--- a/invensense/mlsdk/mllite/mlFIFO.c
+++ b/invensense/mlsdk/mllite/mlFIFO.c
@@ -730,7 +730,7 @@ inv_error_t inv_set_fifo_processed_callback(void (*func) (void))
inv_error_t inv_process_fifo_packet(const unsigned char *dmpData)
{
INVENSENSE_FUNC_START;
- int N, kk;
+ unsigned int N, kk;
unsigned char *p;
p = (unsigned char *)(&fifo_obj.decoded);
diff --git a/invensense/mlsdk/mllite/mldl.c b/invensense/mlsdk/mllite/mldl.c
index eddef84..10470e6 100644
--- a/invensense/mlsdk/mllite/mldl.c
+++ b/invensense/mlsdk/mllite/mldl.c
@@ -609,7 +609,7 @@ inv_error_t inv_clock_source(unsigned char clkSource)
*/
inv_error_t inv_set_offsetTC(const unsigned char *tc)
{
- int ii;
+ unsigned int ii;
inv_error_t result;
for (ii = 0; ii < ARRAY_SIZE(mldlCfg.offset_tc); ii++) {
@@ -683,7 +683,7 @@ inv_error_t inv_set_offset(const short *offset)
{
inv_error_t result;
unsigned char regs[7];
- int ii;
+ unsigned int ii;
long sf;
sf = (2000L * 131) / mldlCfg.gyro_sens_trim;
diff --git a/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c b/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c
index 1bd71de..bb7b851 100644
--- a/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c
+++ b/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c
@@ -96,7 +96,7 @@
inv_error_t inv_serial_read_cfg(unsigned char *cfg, unsigned int len)
{
FILE *fp;
- int bytesRead;
+ unsigned int bytesRead;
fp = fopen(MLCFG_FILE, "rb");
if (fp == NULL) {
@@ -122,7 +122,7 @@ inv_error_t inv_serial_read_cfg(unsigned char *cfg, unsigned int len)
inv_error_t inv_serial_write_cfg(unsigned char *cfg, unsigned int len)
{
FILE *fp;
- int bytesWritten;
+ unsigned int bytesWritten;
unsigned char cfgId[4];
fp = fopen(MLCFG_FILE,"wb");
@@ -156,7 +156,7 @@ inv_error_t inv_serial_write_cfg(unsigned char *cfg, unsigned int len)
inv_error_t inv_serial_read_cal(unsigned char *cal, unsigned int len)
{
FILE *fp;
- int bytesRead;
+ unsigned int bytesRead;
inv_error_t result = INV_SUCCESS;
fp = fopen(MLCAL_FILE,"rb");
@@ -187,7 +187,7 @@ read_cal_end:
inv_error_t inv_serial_write_cal(unsigned char *cal, unsigned int len)
{
FILE *fp;
- int bytesWritten;
+ unsigned int bytesWritten;
inv_error_t result = INV_SUCCESS;
fp = fopen(MLCAL_FILE,"wb");