summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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