summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2017-11-30 18:23:51 -0600
committerElliott Hughes2017-11-30 18:24:36 -0600
commit38d2567c9ffa089661e784b63a5448f8a16572c8 (patch)
treefbeef91072ff19233e17f50fb7cad67647448629 /libcutils/ashmem-host.cpp
parentaaa0bbce8eadf1a428493f3524066a74447eded4 (diff)
downloadplatform-system-core-38d2567c9ffa089661e784b63a5448f8a16572c8.tar.gz
platform-system-core-38d2567c9ffa089661e784b63a5448f8a16572c8.tar.xz
platform-system-core-38d2567c9ffa089661e784b63a5448f8a16572c8.zip
Stop defining local "unused" macros now this is C++.
Bug: N/A Test: builds, boots Change-Id: I3eb075d5003fa7cdc6690f4af29a296e22be257c
Diffstat (limited to 'libcutils/ashmem-host.cpp')
-rw-r--r--libcutils/ashmem-host.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/libcutils/ashmem-host.cpp b/libcutils/ashmem-host.cpp
index d2c28f393..b2bec9966 100644
--- a/libcutils/ashmem-host.cpp
+++ b/libcutils/ashmem-host.cpp
@@ -35,12 +35,7 @@
35 35
36#include <utils/Compat.h> 36#include <utils/Compat.h>
37 37
38#ifndef __unused 38int ashmem_create_region(const char* /*ignored*/, size_t size) {
39#define __unused __attribute__((__unused__))
40#endif
41
42int ashmem_create_region(const char *ignored __unused, size_t size)
43{
44 char pattern[PATH_MAX]; 39 char pattern[PATH_MAX];
45 snprintf(pattern, sizeof(pattern), "/tmp/android-ashmem-%d-XXXXXXXXX", getpid()); 40 snprintf(pattern, sizeof(pattern), "/tmp/android-ashmem-%d-XXXXXXXXX", getpid());
46 int fd = mkstemp(pattern); 41 int fd = mkstemp(pattern);
@@ -56,18 +51,15 @@ int ashmem_create_region(const char *ignored __unused, size_t size)
56 return fd; 51 return fd;
57} 52}
58 53
59int ashmem_set_prot_region(int fd __unused, int prot __unused) 54int ashmem_set_prot_region(int /*fd*/, int /*prot*/) {
60{
61 return 0; 55 return 0;
62} 56}
63 57
64int ashmem_pin_region(int fd __unused, size_t offset __unused, size_t len __unused) 58int ashmem_pin_region(int /*fd*/, size_t /*offset*/, size_t /*len*/) {
65{
66 return 0 /*ASHMEM_NOT_PURGED*/; 59 return 0 /*ASHMEM_NOT_PURGED*/;
67} 60}
68 61
69int ashmem_unpin_region(int fd __unused, size_t offset __unused, size_t len __unused) 62int ashmem_unpin_region(int /*fd*/, size_t /*offset*/, size_t /*len*/) {
70{
71 return 0 /*ASHMEM_IS_UNPINNED*/; 63 return 0 /*ASHMEM_IS_UNPINNED*/;
72} 64}
73 65