Skip to content

Instantly share code, notes, and snippets.

@luk1337
Created December 18, 2015 14:58
Show Gist options
  • Save luk1337/4a0bfaf7e454b4a6f22d to your computer and use it in GitHub Desktop.
Save luk1337/4a0bfaf7e454b4a6f22d to your computer and use it in GitHub Desktop.
diff --git a/sensors/bst/daemon/inc/channel.h b/sensors/bst/daemon/inc/channel.h
index 84ce43f..7ad882b 100644
--- a/sensors/bst/daemon/inc/channel.h
+++ b/sensors/bst/daemon/inc/channel.h
@@ -147,7 +147,7 @@ struct channel_cfg {
struct channel {
- const char const *name;
+ const char *name;
/* NOTE: limitations */
const int32_t type;
/* id which identify a channel uniquely */
@@ -342,4 +342,4 @@ int channel_get_num();
struct channel *channel_get_ch(int handle);
-#endif
\ No newline at end of file
+#endif
diff --git a/sensors/bst/daemon/inc/sensor_hw.h b/sensors/bst/daemon/inc/sensor_hw.h
index d05830a..7a40c59 100644
--- a/sensors/bst/daemon/inc/sensor_hw.h
+++ b/sensors/bst/daemon/inc/sensor_hw.h
@@ -105,7 +105,7 @@ typedef struct axis_remap {
struct sensor_hw {
- const char const *name;
+ const char *name;
/* defined as SENSOR_HW_TYPE_X */
const int32_t type;
@@ -188,4 +188,4 @@ struct sensor_hw_g {
int (*set_range)(struct sensor_hw_g *, uint32_t range);
};
-#endif
\ No newline at end of file
+#endif
diff --git a/sensors/bst/daemon/src/event_handler.c b/sensors/bst/daemon/src/event_handler.c
index 84e2f4d..97a7ff1 100644
--- a/sensors/bst/daemon/src/event_handler.c
+++ b/sensors/bst/daemon/src/event_handler.c
@@ -244,7 +244,6 @@ void check_cmd_event() {
#if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__
int fifo_write_flush_finish_event(int handle) {
- int ret;
struct exchange event;
event.magic = CHANNEL_PKT_MAGIC_DAT;
event.data.version = sizeof(struct exchange);
@@ -617,4 +616,4 @@ void unregister_display_event_handler(display_event_handler_t *phandler)
{
g_display_event_handler = NULL;
}
-#endif
\ No newline at end of file
+#endif
diff --git a/sensors/bst/hal/LightSensor.cpp b/sensors/bst/hal/LightSensor.cpp
index aae8254..c25f08b 100644
--- a/sensors/bst/hal/LightSensor.cpp
+++ b/sensors/bst/hal/LightSensor.cpp
@@ -84,7 +84,6 @@ mInputReader(4),
mHasPendingEvent(false),
sensor_index(-1) {
int i;
- char *tok = NULL;
mPendingEvent.version = sizeof(sensors_event_t);
mPendingEvent.sensor = SENSORS_LIGHT_HANDLE;
@@ -173,6 +172,8 @@ int LightSensor::setDelay(int32_t handle, int64_t ns) {
close(fd);
return 0;
}
+
+ UNUSED_PARAM(handle);
return -1;
}
@@ -207,6 +208,8 @@ int LightSensor::enable(int32_t handle, int en) {
return -1;
}
}
+
+ UNUSED_PARAM(handle);
return 0;
}
@@ -301,6 +304,8 @@ float LightSensor::convertEvent(int value) {
int LightSensor::flush(int id) {
int ret = 0;
mPendingFlushFinishEvent++;
+
+ UNUSED_PARAM(id);
return ret;
}
diff --git a/sensors/bst/hal/ProximitySensor.cpp b/sensors/bst/hal/ProximitySensor.cpp
index ecd012c..26af60a 100644
--- a/sensors/bst/hal/ProximitySensor.cpp
+++ b/sensors/bst/hal/ProximitySensor.cpp
@@ -273,6 +273,7 @@ int ProximitySensor::flush(int id) {
int ret = 0;
mPendingFlushFinishEvent++;
PINFO("<BST> flush sensor id: %d for %d times", id, mPendingFlushFinishEvent);
+ UNUSED_PARAM(id);
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment