summaryrefslogtreecommitdiffstats
path: root/liblight
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-10-20 12:07:04 -0500
committerZiyan <jaraidaniel@gmail.com>2016-01-17 20:23:02 +0100
commitbb7922f7f22bd99a61bec846efca9dab25fcf666 (patch)
treed7731498d642ca2976982f6e234a418de2f63d0d /liblight
parent93fdd1fdef9cc39699d826aaa59f824c1717622b (diff)
downloaddevice_samsung_tuna-bb7922f7f22bd99a61bec846efca9dab25fcf666.zip
device_samsung_tuna-bb7922f7f22bd99a61bec846efca9dab25fcf666.tar.gz
device_samsung_tuna-bb7922f7f22bd99a61bec846efca9dab25fcf666.tar.bz2
liblight: Build with -Wall -Werror.
Change-Id: I576d40023e7d1981a2da6ce5d6dd999067418c89
Diffstat (limited to 'liblight')
-rwxr-xr-xliblight/Android.mk2
-rw-r--r--liblight/lights.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/liblight/Android.mk b/liblight/Android.mk
index 159d91f..34465e0 100755
--- a/liblight/Android.mk
+++ b/liblight/Android.mk
@@ -30,4 +30,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../kernel-headers
LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS := -Wall -Werror
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/liblight/lights.c b/liblight/lights.c
index e155d70..943fc2f 100644
--- a/liblight/lights.c
+++ b/liblight/lights.c
@@ -16,6 +16,7 @@
#define LOG_TAG "lights"
#include <cutils/log.h>
+#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
@@ -91,7 +92,7 @@ static int rgb_to_brightness(struct light_state_t const *state)
+ (150*((color>>8) & 0x00ff)) + (29*(color & 0x00ff))) >> 8;
}
-static int set_light_backlight(struct light_device_t *dev,
+static int set_light_backlight(struct light_device_t *dev __unused,
struct light_state_t const *state)
{
int err = 0;
@@ -207,13 +208,13 @@ static int set_light_leds(struct light_state_t const *state, int type)
return write_leds_priority();
}
-static int set_light_leds_notifications(struct light_device_t *dev,
+static int set_light_leds_notifications(struct light_device_t *dev __unused,
struct light_state_t const *state)
{
return set_light_leds(state, LED_TYPE_NOTIFICATION);
}
-static int set_light_leds_attention(struct light_device_t *dev,
+static int set_light_leds_attention(struct light_device_t *dev __unused,
struct light_state_t const *state)
{
struct light_state_t attention_state = *state;
@@ -224,7 +225,7 @@ static int set_light_leds_attention(struct light_device_t *dev,
return set_light_leds(&attention_state, LED_TYPE_ATTENTION);
}
-static int set_light_leds_battery(struct light_device_t *dev,
+static int set_light_leds_battery(struct light_device_t *dev __unused,
struct light_state_t const *state)
{
return set_light_leds(state, LED_TYPE_CHARGING);