hardware/intel/libsensors
Revision | 2b340a9c6849f3d53adcb9c76b22a62e7eb1fdc4 (tree) |
---|---|
Time | 2017-11-30 02:41:05 |
Author | Rob Herring <robh@kern...> |
Commiter | Rob Herring |
Fix build warnings
AOSP now builds with -Werror, so the build needs to be warning free.
Signed-off-by: Rob Herring <robh@kernel.org>
@@ -40,7 +40,7 @@ endif | ||
40 | 40 | LOCAL_MODULE_OWNER := intel |
41 | 41 | LOCAL_MODULE_RELATIVE_PATH := hw |
42 | 42 | LOCAL_MODULE_TAGS := optional |
43 | -LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -fvisibility=hidden | |
43 | +LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -fvisibility=hidden -Wno-missing-field-initializers | |
44 | 44 | ifeq ($(NO_IIO_EVENTS),true) |
45 | 45 | LOCAL_CFLAGS += -D__NO_EVENTS__ |
46 | 46 | endif |
@@ -757,7 +757,6 @@ static float select_closest_available_rate(int s, float requested_rate) | ||
757 | 757 | int j; |
758 | 758 | float selected_rate = 0; |
759 | 759 | float max_rate_from_prop = sensor_get_max_freq(s); |
760 | - int dev_num = sensor[s].dev_num; | |
761 | 760 | |
762 | 761 | if (!sensor[s].avail_freqs_count) |
763 | 762 | return requested_rate; |
@@ -660,7 +660,7 @@ static int get_cdd_freq (int s, int must) | ||
660 | 660 | */ |
661 | 661 | max_delay_t sensor_get_max_delay (int s) |
662 | 662 | { |
663 | - int dev_num = sensor[s].dev_num, i; | |
663 | + int i; | |
664 | 664 | float min_supported_rate; |
665 | 665 | float rate_cap; |
666 | 666 |
@@ -738,7 +738,7 @@ float sensor_get_max_static_freq(int s) | ||
738 | 738 | |
739 | 739 | int32_t sensor_get_min_delay (int s) |
740 | 740 | { |
741 | - int dev_num = sensor[s].dev_num, i; | |
741 | + int i; | |
742 | 742 | float max_supported_rate = 0; |
743 | 743 | float max_from_prop = sensor_get_max_freq(s); |
744 | 744 |
@@ -446,7 +446,7 @@ static void populate_descriptors (int s, int sensor_type) | ||
446 | 446 | sensor_desc[s].minDelay = sensor_get_min_delay(s); |
447 | 447 | sensor_desc[s].maxDelay = sensor_get_max_delay(s); |
448 | 448 | |
449 | - ALOGV("Sensor %d (%s) type(%d) minD(%d) maxD(%d) flags(%2.2x)\n", | |
449 | + ALOGV("Sensor %d (%s) type(%d) minD(%d) maxD(%zd) flags(%2.2zx)\n", | |
450 | 450 | s, sensor[s].friendly_name, sensor_desc[s].type, |
451 | 451 | sensor_desc[s].minDelay, sensor_desc[s].maxDelay, |
452 | 452 | sensor_desc[s].flags); |
@@ -598,7 +598,6 @@ uint64_t acquire_immediate_uint64_value (int s, int c) | ||
598 | 598 | const char* input_path = sensor_catalog[i].channel[c].input_path; |
599 | 599 | float scale = sensor[s].scale ? sensor[s].scale : sensor[s].channel[c].scale; |
600 | 600 | float offset = sensor[s].offset; |
601 | - int sensor_type = sensor_catalog[i].type; | |
602 | 601 | float correction; |
603 | 602 | |
604 | 603 | /* In case correction has been requested using properties, apply it */ |
@@ -202,7 +202,7 @@ int sysfs_read_str(const char path[PATH_MAX], char *buf, int buf_len) | ||
202 | 202 | |
203 | 203 | int64_t get_timestamp (clockid_t clock_id) |
204 | 204 | { |
205 | - struct timespec ts = {0}; | |
205 | + struct timespec ts = {0, 0}; | |
206 | 206 | |
207 | 207 | if (!clock_gettime(clock_id, &ts)) |
208 | 208 | return 1000000000LL * ts.tv_sec + ts.tv_nsec; |