Loading libcutils/android_reboot.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,7 @@ #define TAG "android_reboot" #define TAG "android_reboot" int android_reboot(int cmd, int flags __unused, const char* arg) { int android_reboot(int cmd, int /*flags*/, const char* arg) { int ret; int ret; const char* restart_cmd = NULL; const char* restart_cmd = NULL; char* prop_value; char* prop_value; Loading libcutils/ashmem-host.cpp +4 −12 Original line number Original line Diff line number Diff line Loading @@ -35,12 +35,7 @@ #include <utils/Compat.h> #include <utils/Compat.h> #ifndef __unused int ashmem_create_region(const char* /*ignored*/, size_t size) { #define __unused __attribute__((__unused__)) #endif int ashmem_create_region(const char *ignored __unused, size_t size) { char pattern[PATH_MAX]; char pattern[PATH_MAX]; snprintf(pattern, sizeof(pattern), "/tmp/android-ashmem-%d-XXXXXXXXX", getpid()); snprintf(pattern, sizeof(pattern), "/tmp/android-ashmem-%d-XXXXXXXXX", getpid()); int fd = mkstemp(pattern); int fd = mkstemp(pattern); Loading @@ -56,18 +51,15 @@ int ashmem_create_region(const char *ignored __unused, size_t size) return fd; return fd; } } int ashmem_set_prot_region(int fd __unused, int prot __unused) int ashmem_set_prot_region(int /*fd*/, int /*prot*/) { { return 0; return 0; } } int ashmem_pin_region(int fd __unused, size_t offset __unused, size_t len __unused) int ashmem_pin_region(int /*fd*/, size_t /*offset*/, size_t /*len*/) { { return 0 /*ASHMEM_NOT_PURGED*/; return 0 /*ASHMEM_NOT_PURGED*/; } } int ashmem_unpin_region(int fd __unused, size_t offset __unused, size_t len __unused) int ashmem_unpin_region(int /*fd*/, size_t /*offset*/, size_t /*len*/) { { return 0 /*ASHMEM_IS_UNPINNED*/; return 0 /*ASHMEM_IS_UNPINNED*/; } } Loading libcutils/sched_policy.cpp +2 −6 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,6 @@ #include <log/log.h> #include <log/log.h> #define UNUSED __attribute__((__unused__)) /* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged. /* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged. * Call this any place a SchedPolicy is used as an input parameter. * Call this any place a SchedPolicy is used as an input parameter. * Returns the possibly re-mapped policy. * Returns the possibly re-mapped policy. Loading Loading @@ -445,13 +443,11 @@ int set_sched_policy(int tid, SchedPolicy policy) /* Stubs for non-Android targets. */ /* Stubs for non-Android targets. */ int set_sched_policy(int tid UNUSED, SchedPolicy policy UNUSED) int set_sched_policy(int /*tid*/, SchedPolicy /*policy*/) { { return 0; return 0; } } int get_sched_policy(int tid UNUSED, SchedPolicy *policy) int get_sched_policy(int /*tid*/, SchedPolicy* policy) { { *policy = SP_SYSTEM_DEFAULT; *policy = SP_SYSTEM_DEFAULT; return 0; return 0; } } Loading libcutils/socket_local_client_unix.cpp +1 −5 Original line number Original line Diff line number Diff line Loading @@ -39,8 +39,6 @@ int socket_local_client(const char *name, int namespaceId, int type) #include "socket_local_unix.h" #include "socket_local_unix.h" #define UNUSED __attribute__((unused)) #define LISTEN_BACKLOG 4 #define LISTEN_BACKLOG 4 /* Documented in header file. */ /* Documented in header file. */ Loading Loading @@ -123,9 +121,7 @@ error: * * * Used by AndroidSocketImpl * Used by AndroidSocketImpl */ */ int socket_local_client_connect(int fd, const char *name, int namespaceId, int socket_local_client_connect(int fd, const char* name, int namespaceId, int /*type*/) { int type UNUSED) { struct sockaddr_un addr; struct sockaddr_un addr; socklen_t alen; socklen_t alen; int err; int err; Loading libcutils/str_parms.cpp +1 −4 Original line number Original line Diff line number Diff line Loading @@ -30,8 +30,6 @@ #include <cutils/memory.h> #include <cutils/memory.h> #include <log/log.h> #include <log/log.h> #define UNUSED __attribute__((unused)) /* When an object is allocated but not freed in a function, /* When an object is allocated but not freed in a function, * because its ownership is released to other object like a hashmap, * because its ownership is released to other object like a hashmap, * call RELEASE_OWNERSHIP to tell the clang analyzer and avoid * call RELEASE_OWNERSHIP to tell the clang analyzer and avoid Loading Loading @@ -364,8 +362,7 @@ char *str_parms_to_str(struct str_parms *str_parms) return str; return str; } } static bool dump_entry(void *key, void *value, void *context UNUSED) static bool dump_entry(void* key, void* value, void* /*context*/) { { ALOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value); ALOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value); return true; return true; } } Loading Loading
libcutils/android_reboot.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,7 @@ #define TAG "android_reboot" #define TAG "android_reboot" int android_reboot(int cmd, int flags __unused, const char* arg) { int android_reboot(int cmd, int /*flags*/, const char* arg) { int ret; int ret; const char* restart_cmd = NULL; const char* restart_cmd = NULL; char* prop_value; char* prop_value; Loading
libcutils/ashmem-host.cpp +4 −12 Original line number Original line Diff line number Diff line Loading @@ -35,12 +35,7 @@ #include <utils/Compat.h> #include <utils/Compat.h> #ifndef __unused int ashmem_create_region(const char* /*ignored*/, size_t size) { #define __unused __attribute__((__unused__)) #endif int ashmem_create_region(const char *ignored __unused, size_t size) { char pattern[PATH_MAX]; char pattern[PATH_MAX]; snprintf(pattern, sizeof(pattern), "/tmp/android-ashmem-%d-XXXXXXXXX", getpid()); snprintf(pattern, sizeof(pattern), "/tmp/android-ashmem-%d-XXXXXXXXX", getpid()); int fd = mkstemp(pattern); int fd = mkstemp(pattern); Loading @@ -56,18 +51,15 @@ int ashmem_create_region(const char *ignored __unused, size_t size) return fd; return fd; } } int ashmem_set_prot_region(int fd __unused, int prot __unused) int ashmem_set_prot_region(int /*fd*/, int /*prot*/) { { return 0; return 0; } } int ashmem_pin_region(int fd __unused, size_t offset __unused, size_t len __unused) int ashmem_pin_region(int /*fd*/, size_t /*offset*/, size_t /*len*/) { { return 0 /*ASHMEM_NOT_PURGED*/; return 0 /*ASHMEM_NOT_PURGED*/; } } int ashmem_unpin_region(int fd __unused, size_t offset __unused, size_t len __unused) int ashmem_unpin_region(int /*fd*/, size_t /*offset*/, size_t /*len*/) { { return 0 /*ASHMEM_IS_UNPINNED*/; return 0 /*ASHMEM_IS_UNPINNED*/; } } Loading
libcutils/sched_policy.cpp +2 −6 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,6 @@ #include <log/log.h> #include <log/log.h> #define UNUSED __attribute__((__unused__)) /* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged. /* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged. * Call this any place a SchedPolicy is used as an input parameter. * Call this any place a SchedPolicy is used as an input parameter. * Returns the possibly re-mapped policy. * Returns the possibly re-mapped policy. Loading Loading @@ -445,13 +443,11 @@ int set_sched_policy(int tid, SchedPolicy policy) /* Stubs for non-Android targets. */ /* Stubs for non-Android targets. */ int set_sched_policy(int tid UNUSED, SchedPolicy policy UNUSED) int set_sched_policy(int /*tid*/, SchedPolicy /*policy*/) { { return 0; return 0; } } int get_sched_policy(int tid UNUSED, SchedPolicy *policy) int get_sched_policy(int /*tid*/, SchedPolicy* policy) { { *policy = SP_SYSTEM_DEFAULT; *policy = SP_SYSTEM_DEFAULT; return 0; return 0; } } Loading
libcutils/socket_local_client_unix.cpp +1 −5 Original line number Original line Diff line number Diff line Loading @@ -39,8 +39,6 @@ int socket_local_client(const char *name, int namespaceId, int type) #include "socket_local_unix.h" #include "socket_local_unix.h" #define UNUSED __attribute__((unused)) #define LISTEN_BACKLOG 4 #define LISTEN_BACKLOG 4 /* Documented in header file. */ /* Documented in header file. */ Loading Loading @@ -123,9 +121,7 @@ error: * * * Used by AndroidSocketImpl * Used by AndroidSocketImpl */ */ int socket_local_client_connect(int fd, const char *name, int namespaceId, int socket_local_client_connect(int fd, const char* name, int namespaceId, int /*type*/) { int type UNUSED) { struct sockaddr_un addr; struct sockaddr_un addr; socklen_t alen; socklen_t alen; int err; int err; Loading
libcutils/str_parms.cpp +1 −4 Original line number Original line Diff line number Diff line Loading @@ -30,8 +30,6 @@ #include <cutils/memory.h> #include <cutils/memory.h> #include <log/log.h> #include <log/log.h> #define UNUSED __attribute__((unused)) /* When an object is allocated but not freed in a function, /* When an object is allocated but not freed in a function, * because its ownership is released to other object like a hashmap, * because its ownership is released to other object like a hashmap, * call RELEASE_OWNERSHIP to tell the clang analyzer and avoid * call RELEASE_OWNERSHIP to tell the clang analyzer and avoid Loading Loading @@ -364,8 +362,7 @@ char *str_parms_to_str(struct str_parms *str_parms) return str; return str; } } static bool dump_entry(void *key, void *value, void *context UNUSED) static bool dump_entry(void* key, void* value, void* /*context*/) { { ALOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value); ALOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value); return true; return true; } } Loading