am 82e1b89f: am a32e01d2: Merge "libcutils: turn on -Werror"

* commit '82e1b89f22a2f088ff38f1ff094f22d7b31327b6':
  libcutils: turn on -Werror
This commit is contained in:
Mark Salyzyn 2014-05-02 17:09:11 +00:00 committed by Android Git Automerger
commit a0a461d3b7
18 changed files with 99 additions and 106 deletions

View file

@ -77,7 +77,7 @@ LOCAL_MODULE := libcutils
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
LOCAL_LDLIBS := -lpthread LOCAL_LDLIBS := -lpthread
LOCAL_STATIC_LIBRARIES := liblog LOCAL_STATIC_LIBRARIES := liblog
LOCAL_CFLAGS += $(hostSmpFlag) LOCAL_CFLAGS += $(hostSmpFlag) -Werror
include $(BUILD_HOST_STATIC_LIBRARY) include $(BUILD_HOST_STATIC_LIBRARY)
@ -88,14 +88,14 @@ LOCAL_MODULE := lib64cutils
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
LOCAL_LDLIBS := -lpthread LOCAL_LDLIBS := -lpthread
LOCAL_STATIC_LIBRARIES := lib64log LOCAL_STATIC_LIBRARIES := lib64log
LOCAL_CFLAGS += $(hostSmpFlag) -m64 LOCAL_CFLAGS += $(hostSmpFlag) -m64 -Werror
include $(BUILD_HOST_STATIC_LIBRARY) include $(BUILD_HOST_STATIC_LIBRARY)
# Tests for host # Tests for host
# ======================================================== # ========================================================
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := tst_str_parms LOCAL_MODULE := tst_str_parms
LOCAL_CFLAGS += -DTEST_STR_PARMS LOCAL_CFLAGS += -DTEST_STR_PARMS -Werror
LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c
LOCAL_STATIC_LIBRARIES := liblog LOCAL_STATIC_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
@ -135,7 +135,7 @@ endif # !arm
LOCAL_C_INCLUDES := $(libcutils_c_includes) LOCAL_C_INCLUDES := $(libcutils_c_includes)
LOCAL_STATIC_LIBRARIES := liblog LOCAL_STATIC_LIBRARIES := liblog
LOCAL_CFLAGS += $(targetSmpFlag) LOCAL_CFLAGS += $(targetSmpFlag) -Werror
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
@ -144,13 +144,13 @@ LOCAL_MODULE := libcutils
# liblog symbols present in libcutils. # liblog symbols present in libcutils.
LOCAL_WHOLE_STATIC_LIBRARIES := libcutils liblog LOCAL_WHOLE_STATIC_LIBRARIES := libcutils liblog
LOCAL_SHARED_LIBRARIES := liblog LOCAL_SHARED_LIBRARIES := liblog
LOCAL_CFLAGS += $(targetSmpFlag) LOCAL_CFLAGS += $(targetSmpFlag) -Werror
LOCAL_C_INCLUDES := $(libcutils_c_includes) LOCAL_C_INCLUDES := $(libcutils_c_includes)
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := tst_str_parms LOCAL_MODULE := tst_str_parms
LOCAL_CFLAGS += -DTEST_STR_PARMS LOCAL_CFLAGS += -DTEST_STR_PARMS -Werror
LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c
LOCAL_SHARED_LIBRARIES := liblog LOCAL_SHARED_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional

View file

@ -19,20 +19,22 @@
* an ashmem-enabled kernel. See ashmem-dev.c for the real ashmem-based version. * an ashmem-enabled kernel. See ashmem-dev.c for the real ashmem-based version.
*/ */
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h> #include <errno.h>
#include <time.h> #include <fcntl.h>
#include <limits.h> #include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <cutils/ashmem.h> #include <cutils/ashmem.h>
int ashmem_create_region(const char *ignored, size_t size) #define __unused __attribute__((__unused__))
int ashmem_create_region(const char *ignored __unused, size_t size)
{ {
static const char txt[] = "abcdefghijklmnopqrstuvwxyz" static const char txt[] = "abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
@ -78,17 +80,17 @@ error:
return -1; return -1;
} }
int ashmem_set_prot_region(int fd, int prot) int ashmem_set_prot_region(int fd __unused, int prot __unused)
{ {
return 0; return 0;
} }
int ashmem_pin_region(int fd, size_t offset, size_t len) int ashmem_pin_region(int fd __unused, size_t offset __unused, size_t len __unused)
{ {
return ASHMEM_NOT_PURGED; return ASHMEM_NOT_PURGED;
} }
int ashmem_unpin_region(int fd, size_t offset, size_t len) int ashmem_unpin_region(int fd __unused, size_t offset __unused, size_t len __unused)
{ {
return ASHMEM_IS_UNPINNED; return ASHMEM_IS_UNPINNED;
} }

View file

@ -1,5 +1,4 @@
/* libs/cutils/cpu_info.c /*
**
** Copyright 2007, The Android Open Source Project ** Copyright 2007, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -15,11 +14,12 @@
** limitations under the License. ** limitations under the License.
*/ */
#include <cutils/cpu_info.h>
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <cutils/cpu_info.h>
// we cache the serial number here. // we cache the serial number here.
// this is also used as a fgets() line buffer when we are reading /proc/cpuinfo // this is also used as a fgets() line buffer when we are reading /proc/cpuinfo
static char serial_number[100] = { 0 }; static char serial_number[100] = { 0 };
@ -31,7 +31,6 @@ extern const char* get_cpu_serial_number(void)
FILE* file; FILE* file;
char* chp, *end; char* chp, *end;
char* whitespace; char* whitespace;
int length;
// read serial number from /proc/cpuinfo // read serial number from /proc/cpuinfo
file = fopen("proc/cpuinfo", "r"); file = fopen("proc/cpuinfo", "r");

View file

@ -15,20 +15,22 @@
*/ */
#include "../../../bionic/libc/bionic/dlmalloc.h" #include "../../../bionic/libc/bionic/dlmalloc.h"
#include "cutils/log.h" #include "log/log.h"
#define UNUSED __attribute__((__unused__))
/* /*
* Stubs for functions defined in bionic/libc/bionic/dlmalloc.c. These * Stubs for functions defined in bionic/libc/bionic/dlmalloc.c. These
* are used in host builds, as the host libc will not contain these * are used in host builds, as the host libc will not contain these
* functions. * functions.
*/ */
void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t, void*), void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t, void*) UNUSED,
void* arg) void* arg UNUSED)
{ {
ALOGW("Called host unimplemented stub: dlmalloc_inspect_all"); ALOGW("Called host unimplemented stub: dlmalloc_inspect_all");
} }
int dlmalloc_trim(size_t unused) int dlmalloc_trim(size_t unused UNUSED)
{ {
ALOGW("Called host unimplemented stub: dlmalloc_trim"); ALOGW("Called host unimplemented stub: dlmalloc_trim");
return 0; return 0;

View file

@ -1,5 +1,4 @@
/* /*
**
** Copyright 2007-2014, The Android Open Source Project ** Copyright 2007-2014, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -15,12 +14,12 @@
** limitations under the License. ** limitations under the License.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifdef HAVE_SCHED_H #ifdef HAVE_SCHED_H
@ -30,6 +29,9 @@
/* #include <linux/ioprio.h> */ /* #include <linux/ioprio.h> */
extern int ioprio_set(int which, int who, int ioprio); extern int ioprio_set(int which, int who, int ioprio);
extern int ioprio_get(int which, int who); extern int ioprio_get(int which, int who);
#define __android_unused
#else
#define __android_unused __attribute__((__unused__))
#endif #endif
enum { enum {
@ -41,7 +43,7 @@ enum {
#define CLASS_SHIFT 13 #define CLASS_SHIFT 13
#define IOPRIO_NORM 4 #define IOPRIO_NORM 4
int android_set_ioprio(int pid, IoSchedClass clazz, int ioprio) { int android_set_ioprio(int pid __android_unused, IoSchedClass clazz __android_unused, int ioprio __android_unused) {
#ifdef HAVE_ANDROID_OS #ifdef HAVE_ANDROID_OS
if (ioprio_set(WHO_PROCESS, pid, ioprio | (clazz << CLASS_SHIFT))) { if (ioprio_set(WHO_PROCESS, pid, ioprio | (clazz << CLASS_SHIFT))) {
return -1; return -1;
@ -50,7 +52,7 @@ int android_set_ioprio(int pid, IoSchedClass clazz, int ioprio) {
return 0; return 0;
} }
int android_get_ioprio(int pid, IoSchedClass *clazz, int *ioprio) { int android_get_ioprio(int pid __android_unused, IoSchedClass *clazz, int *ioprio) {
#ifdef HAVE_ANDROID_OS #ifdef HAVE_ANDROID_OS
int rc; int rc;

View file

@ -14,12 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/mount.h> /* for BLKGETSIZE */ #include <sys/mount.h> /* for BLKGETSIZE */
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <cutils/properties.h> #include <cutils/properties.h>
static int only_one_char(char *buf, int len, char c) static int only_one_char(char *buf, int len, char c)
@ -39,7 +40,7 @@ static int only_one_char(char *buf, int len, char c)
int partition_wiped(char *source) int partition_wiped(char *source)
{ {
char buf[4096]; char buf[4096];
int fd, ret, wiped; int fd, ret;
if ((fd = open(source, O_RDONLY)) < 0) { if ((fd = open(source, O_RDONLY)) < 0) {
return 0; return 0;

View file

@ -14,25 +14,27 @@
* limitations under the License. * limitations under the License.
*/ */
#include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#if defined(HAVE_PRCTL)
#include <sys/prctl.h>
#endif
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <cutils/process_name.h> #include <cutils/process_name.h>
#ifdef HAVE_ANDROID_OS #ifdef HAVE_ANDROID_OS
#include <cutils/properties.h> #include <cutils/properties.h>
#endif #endif
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#if defined(HAVE_PRCTL)
#include <sys/prctl.h>
#endif
#define PROCESS_NAME_DEVICE "/sys/qemu_trace/process_name" #define PROCESS_NAME_DEVICE "/sys/qemu_trace/process_name"
static const char* process_name = "unknown"; static const char* process_name = "unknown";
#ifdef HAVE_ANDROID_OS
static int running_in_emulator = -1; static int running_in_emulator = -1;
#endif
void set_process_name(const char* new_name) { void set_process_name(const char* new_name) {
#ifdef HAVE_ANDROID_OS #ifdef HAVE_ANDROID_OS

View file

@ -1,5 +1,4 @@
/* libcutils/qtaguid.c /*
**
** Copyright 2011, The Android Open Source Project ** Copyright 2011, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -146,7 +145,7 @@ int qtaguid_setCounterSet(int counterSetNum, uid_t uid) {
int qtaguid_deleteTagData(int tag, uid_t uid) { int qtaguid_deleteTagData(int tag, uid_t uid) {
char lineBuf[CTRL_MAX_INPUT_LEN]; char lineBuf[CTRL_MAX_INPUT_LEN];
int fd, cnt = 0, res = 0; int cnt = 0, res = 0;
uint64_t kTag = (uint64_t)tag << 32; uint64_t kTag = (uint64_t)tag << 32;
ALOGV("Deleting tag data with tag %" PRIx64 "{%d,0} for uid %d", kTag, tag, uid); ALOGV("Deleting tag data with tag %" PRIx64 "{%d,0} for uid %d", kTag, tag, uid);
@ -164,8 +163,6 @@ int qtaguid_deleteTagData(int tag, uid_t uid) {
} }
int qtaguid_setPacifier(int on) { int qtaguid_setPacifier(int on) {
int param_fd;
int res;
const char *value; const char *value;
value = on ? "Y" : "N"; value = on ? "Y" : "N";

View file

@ -1,6 +1,4 @@
/*
/* libs/cutils/sched_policy.c
**
** Copyright 2007, The Android Open Source Project ** Copyright 2007, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -18,14 +16,17 @@
#define LOG_TAG "SchedPolicy" #define LOG_TAG "SchedPolicy"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <cutils/sched_policy.h> #include <cutils/sched_policy.h>
#include <cutils/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.
@ -331,12 +332,12 @@ int set_sched_policy(int tid, SchedPolicy policy)
/* Stubs for non-Android targets. */ /* Stubs for non-Android targets. */
int set_sched_policy(int tid, SchedPolicy policy) int set_sched_policy(int tid UNUSED, SchedPolicy policy UNUSED)
{ {
return 0; return 0;
} }
int get_sched_policy(int tid, SchedPolicy *policy) int get_sched_policy(int tid UNUSED, SchedPolicy *policy)
{ {
*policy = SP_SYSTEM_DEFAULT; *policy = SP_SYSTEM_DEFAULT;
return 0; return 0;

View file

@ -1,5 +1,4 @@
/* libs/cutils/socket_inaddr_any_server.c /*
**
** Copyright 2006, The Android Open Source Project ** Copyright 2006, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -15,13 +14,11 @@
** limitations under the License. ** limitations under the License.
*/ */
#include <cutils/sockets.h> #include <errno.h>
#include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h>
#include <stddef.h>
#ifndef HAVE_WINSOCK #ifndef HAVE_WINSOCK
#include <sys/socket.h> #include <sys/socket.h>
@ -30,13 +27,14 @@
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include <cutils/sockets.h>
#define LISTEN_BACKLOG 4 #define LISTEN_BACKLOG 4
/* open listen() port on any interface */ /* open listen() port on any interface */
int socket_inaddr_any_server(int port, int type) int socket_inaddr_any_server(int port, int type)
{ {
struct sockaddr_in addr; struct sockaddr_in addr;
size_t alen;
int s, n; int s, n;
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));

View file

@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
#include <cutils/sockets.h> #include <errno.h>
#include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h>
#include <stddef.h> #include <cutils/sockets.h>
#ifdef HAVE_WINSOCK #ifdef HAVE_WINSOCK
@ -128,7 +128,6 @@ int socket_local_client_connect(int fd, const char *name, int namespaceId,
{ {
struct sockaddr_un addr; struct sockaddr_un addr;
socklen_t alen; socklen_t alen;
size_t namelen;
int err; int err;
err = socket_make_sockaddr_un(name, namespaceId, &addr, &alen); err = socket_make_sockaddr_un(name, namespaceId, &addr, &alen);

View file

@ -1,5 +1,4 @@
/* libs/cutils/socket_loopback_client.c /*
**
** Copyright 2006, The Android Open Source Project ** Copyright 2006, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -15,13 +14,11 @@
** limitations under the License. ** limitations under the License.
*/ */
#include <cutils/sockets.h> #include <errno.h>
#include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h>
#include <stddef.h>
#ifndef HAVE_WINSOCK #ifndef HAVE_WINSOCK
#include <sys/socket.h> #include <sys/socket.h>
@ -30,6 +27,8 @@
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include <cutils/sockets.h>
/* Connect to port on the loopback IP interface. type is /* Connect to port on the loopback IP interface. type is
* SOCK_STREAM or SOCK_DGRAM. * SOCK_STREAM or SOCK_DGRAM.
* return is a file descriptor or -1 on error * return is a file descriptor or -1 on error
@ -37,7 +36,6 @@
int socket_loopback_client(int port, int type) int socket_loopback_client(int port, int type)
{ {
struct sockaddr_in addr; struct sockaddr_in addr;
socklen_t alen;
int s; int s;
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));

View file

@ -1,5 +1,4 @@
/* libs/cutils/socket_loopback_server.c /*
**
** Copyright 2006, The Android Open Source Project ** Copyright 2006, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -15,13 +14,11 @@
** limitations under the License. ** limitations under the License.
*/ */
#include <cutils/sockets.h> #include <errno.h>
#include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h>
#include <stddef.h>
#define LISTEN_BACKLOG 4 #define LISTEN_BACKLOG 4
@ -32,11 +29,12 @@
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include <cutils/sockets.h>
/* open listen() port on loopback interface */ /* open listen() port on loopback interface */
int socket_loopback_server(int port, int type) int socket_loopback_server(int port, int type)
{ {
struct sockaddr_in addr; struct sockaddr_in addr;
size_t alen;
int s, n; int s, n;
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));

View file

@ -1,5 +1,4 @@
/* libs/cutils/socket_network_client.c /*
**
** Copyright 2006, The Android Open Source Project ** Copyright 2006, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -15,13 +14,11 @@
** limitations under the License. ** limitations under the License.
*/ */
#include <cutils/sockets.h> #include <errno.h>
#include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h>
#include <stddef.h>
#ifndef HAVE_WINSOCK #ifndef HAVE_WINSOCK
#include <sys/socket.h> #include <sys/socket.h>
@ -31,6 +28,7 @@
#include <netdb.h> #include <netdb.h>
#endif #endif
#include <cutils/sockets.h>
/* Connect to port on the IP interface. type is /* Connect to port on the IP interface. type is
* SOCK_STREAM or SOCK_DGRAM. * SOCK_STREAM or SOCK_DGRAM.
@ -40,7 +38,6 @@ int socket_network_client(const char *host, int port, int type)
{ {
struct hostent *hp; struct hostent *hp;
struct sockaddr_in addr; struct sockaddr_in addr;
socklen_t alen;
int s; int s;
hp = gethostbyname(host); hp = gethostbyname(host);

View file

@ -14,15 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
#include <cutils/log.h>
#include <cutils/sockets.h> #include <cutils/sockets.h>
#include <log/log.h>
#ifdef HAVE_ANDROID_OS #ifdef HAVE_ANDROID_OS
/* For the socket trust (credentials) check */ /* For the socket trust (credentials) check */
#include <private/android_filesystem_config.h> #include <private/android_filesystem_config.h>
#define __android_unused
#else
#define __android_unused __attribute__((__unused__))
#endif #endif
bool socket_peer_is_trusted(int fd) bool socket_peer_is_trusted(int fd __android_unused)
{ {
#ifdef HAVE_ANDROID_OS #ifdef HAVE_ANDROID_OS
struct ucred cr; struct ucred cr;

View file

@ -25,10 +25,9 @@
#include <string.h> #include <string.h>
#include <cutils/hashmap.h> #include <cutils/hashmap.h>
#include <cutils/log.h>
#include <cutils/memory.h> #include <cutils/memory.h>
#include <cutils/str_parms.h> #include <cutils/str_parms.h>
#include <log/log.h>
#define UNUSED __attribute__((unused)) #define UNUSED __attribute__((unused))
@ -374,8 +373,6 @@ static void test_str_parms_str(const char *str)
int main(void) int main(void)
{ {
struct str_parms *str_parms;
test_str_parms_str(""); test_str_parms_str("");
test_str_parms_str(";"); test_str_parms_str(";");
test_str_parms_str("="); test_str_parms_str("=");

View file

@ -1,5 +1,4 @@
/* libs/cutils/threads.c /*
**
** Copyright (C) 2007, The Android Open Source Project ** Copyright (C) 2007, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
@ -14,13 +13,12 @@
** See the License for the specific language governing permissions and ** See the License for the specific language governing permissions and
** limitations under the License. ** limitations under the License.
*/ */
#include <cutils/threads.h> #include <cutils/threads.h>
#ifdef HAVE_PTHREADS #ifdef HAVE_PTHREADS
void* thread_store_get( thread_store_t* store ) void* thread_store_get( thread_store_t* store )
{ {
const pthread_key_t k = store->tls;
if (!store->has_tls) if (!store->has_tls)
return NULL; return NULL;

View file

@ -28,7 +28,7 @@
#include <cutils/trace.h> #include <cutils/trace.h>
#define LOG_TAG "cutils-trace" #define LOG_TAG "cutils-trace"
#include <cutils/log.h> #include <log/log.h>
volatile int32_t atrace_is_ready = 0; volatile int32_t atrace_is_ready = 0;
int atrace_marker_fd = -1; int atrace_marker_fd = -1;
@ -86,7 +86,6 @@ static bool atrace_is_cmdline_match(const char* cmdline)
static bool atrace_is_app_tracing_enabled() static bool atrace_is_app_tracing_enabled()
{ {
bool sys_debuggable = false; bool sys_debuggable = false;
bool proc_debuggable = false;
char value[PROPERTY_VALUE_MAX]; char value[PROPERTY_VALUE_MAX];
bool result = false; bool result = false;