Android-x86
Fork
Spenden

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-intel-libsensors: Commit

hardware/intel/libsensors


Commit MetaInfo

Revision2b340a9c6849f3d53adcb9c76b22a62e7eb1fdc4 (tree)
Zeit2017-11-30 02:41:05
AutorRob Herring <robh@kern...>
CommiterRob Herring

Log Message

Fix build warnings

AOSP now builds with -Werror, so the build needs to be warning free.

Signed-off-by: Rob Herring <robh@kernel.org>

Ändern Zusammenfassung

Diff

--- a/Android.mk
+++ b/Android.mk
@@ -40,7 +40,7 @@ endif
4040 LOCAL_MODULE_OWNER := intel
4141 LOCAL_MODULE_RELATIVE_PATH := hw
4242 LOCAL_MODULE_TAGS := optional
43-LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -fvisibility=hidden
43+LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -fvisibility=hidden -Wno-missing-field-initializers
4444 ifeq ($(NO_IIO_EVENTS),true)
4545 LOCAL_CFLAGS += -D__NO_EVENTS__
4646 endif
--- a/control.c
+++ b/control.c
@@ -757,7 +757,6 @@ static float select_closest_available_rate(int s, float requested_rate)
757757 int j;
758758 float selected_rate = 0;
759759 float max_rate_from_prop = sensor_get_max_freq(s);
760- int dev_num = sensor[s].dev_num;
761760
762761 if (!sensor[s].avail_freqs_count)
763762 return requested_rate;
--- a/description.c
+++ b/description.c
@@ -660,7 +660,7 @@ static int get_cdd_freq (int s, int must)
660660 */
661661 max_delay_t sensor_get_max_delay (int s)
662662 {
663- int dev_num = sensor[s].dev_num, i;
663+ int i;
664664 float min_supported_rate;
665665 float rate_cap;
666666
@@ -738,7 +738,7 @@ float sensor_get_max_static_freq(int s)
738738
739739 int32_t sensor_get_min_delay (int s)
740740 {
741- int dev_num = sensor[s].dev_num, i;
741+ int i;
742742 float max_supported_rate = 0;
743743 float max_from_prop = sensor_get_max_freq(s);
744744
--- a/enumeration.c
+++ b/enumeration.c
@@ -446,7 +446,7 @@ static void populate_descriptors (int s, int sensor_type)
446446 sensor_desc[s].minDelay = sensor_get_min_delay(s);
447447 sensor_desc[s].maxDelay = sensor_get_max_delay(s);
448448
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",
450450 s, sensor[s].friendly_name, sensor_desc[s].type,
451451 sensor_desc[s].minDelay, sensor_desc[s].maxDelay,
452452 sensor_desc[s].flags);
--- a/transform.c
+++ b/transform.c
@@ -598,7 +598,6 @@ uint64_t acquire_immediate_uint64_value (int s, int c)
598598 const char* input_path = sensor_catalog[i].channel[c].input_path;
599599 float scale = sensor[s].scale ? sensor[s].scale : sensor[s].channel[c].scale;
600600 float offset = sensor[s].offset;
601- int sensor_type = sensor_catalog[i].type;
602601 float correction;
603602
604603 /* In case correction has been requested using properties, apply it */
--- a/utils.c
+++ b/utils.c
@@ -202,7 +202,7 @@ int sysfs_read_str(const char path[PATH_MAX], char *buf, int buf_len)
202202
203203 int64_t get_timestamp (clockid_t clock_id)
204204 {
205- struct timespec ts = {0};
205+ struct timespec ts = {0, 0};
206206
207207 if (!clock_gettime(clock_id, &ts))
208208 return 1000000000LL * ts.tv_sec + ts.tv_nsec;
Show on old repository browser