libmemtrack: resolve compile errors
authorJan Altensen <info@stricted.net>
Sat, 4 Apr 2020 22:43:05 +0000 (00:43 +0200)
committerJan Altensen <info@stricted.net>
Sun, 5 Apr 2020 10:24:55 +0000 (12:24 +0200)
Change-Id: I5ff7e9589630147da3ce6db7931f370ef25816c2

libmemtrack/Android.mk
libmemtrack/ion.c
libmemtrack/memtrack_exynos.c

index 47aa0a63efc73976a996fbc5f4c0fe375e86db36..f8fbdac4fb07aa740174e3de1ec69ab4373a7fb0 100644 (file)
@@ -19,7 +19,7 @@ LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
 LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_C_INCLUDES += hardware/libhardware/include bionic/libc/include
+LOCAL_C_INCLUDES += hardware/libhardware/include
 LOCAL_SHARED_LIBRARIES := liblog
 LOCAL_SRC_FILES := memtrack_exynos.c mali.c ion.c
 LOCAL_MODULE := memtrack.$(TARGET_BOARD_PLATFORM)
index 1d4a99f928551e2b26b7d661f0e7cab916e3ea22..1d8b500ea5bfe594eb7c6ee9ad3ca68604b729a7 100644 (file)
@@ -45,7 +45,6 @@ int ion_memtrack_get_memory(pid_t pid, enum memtrack_type __unused type,
                              size_t *num_records)
 {
     size_t allocated_records = min(*num_records, ARRAY_SIZE(ion_record_templates));
-    int i;
     FILE *fp;
     struct stat s;
     char line[1024];
index ef6358b578fd14d338d7ae3f3a8d99282ce2c787..77fa96e2415741c8ae1a7fd08bdeb40d03fa3bc9 100644 (file)
@@ -45,17 +45,17 @@ static struct hw_module_methods_t memtrack_module_methods = {
 };
 
 struct memtrack_module HAL_MODULE_INFO_SYM = {
-    common: {
-        tag: HARDWARE_MODULE_TAG,
-        module_api_version: MEMTRACK_MODULE_API_VERSION_0_1,
-        hal_api_version: HARDWARE_HAL_API_VERSION,
-        id: MEMTRACK_HARDWARE_MODULE_ID,
-        name: "Exynos Memory Tracker HAL",
-        author: "The Android Open Source Project",
-        methods: &memtrack_module_methods,
+    .common = {
+        .tag = HARDWARE_MODULE_TAG,
+        .module_api_version = MEMTRACK_MODULE_API_VERSION_0_1,
+        .hal_api_version = HARDWARE_HAL_API_VERSION,
+        .id = MEMTRACK_HARDWARE_MODULE_ID,
+        .name = "Exynos Memory Tracker HAL",
+        .author = "The Android Open Source Project",
+        .methods = &memtrack_module_methods,
     },
 
-    init: exynos_memtrack_init,
-    getMemory: exynos_memtrack_get_memory,
+    .init = exynos_memtrack_init,
+    .getMemory = exynos_memtrack_get_memory,
 };