diff options
author | Elliott Hughes <enh@google.com> | 2012-09-26 14:20:22 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-09-26 14:20:22 -0700 |
commit | ac184b21425a0681c51ef152f0567168b575da49 (patch) | |
tree | 08d0842acb148aa0ec9c01a455cefb28240b8fe6 | |
parent | 8e630dacf61307e4681f04fc6b5ee593f30d91d0 (diff) | |
download | bionic-ac184b21425a0681c51ef152f0567168b575da49.zip bionic-ac184b21425a0681c51ef152f0567168b575da49.tar.gz bionic-ac184b21425a0681c51ef152f0567168b575da49.tar.bz2 |
Fix several compiler warnings.
Change-Id: I55caa50a5937442734f4fcbdb4edf1c70f335bf8
-rw-r--r-- | libc/bionic/tmpfile.cpp | 2 | ||||
-rw-r--r-- | libc/upstream-netbsd/extern.h | 8 | ||||
-rw-r--r-- | tests/stubs_test.cpp | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/libc/bionic/tmpfile.cpp b/libc/bionic/tmpfile.cpp index ad58a92..b97cc6c 100644 --- a/libc/bionic/tmpfile.cpp +++ b/libc/bionic/tmpfile.cpp @@ -57,7 +57,7 @@ class ScopedSignalBlocker { static FILE* __tmpfile_dir(const char* tmp_dir) { char buf[PATH_MAX]; int path_length = snprintf(buf, sizeof(buf), "%s/tmp.XXXXXXXXXX", tmp_dir); - if (path_length >= sizeof(buf)) { + if (path_length >= static_cast<int>(sizeof(buf))) { return NULL; } diff --git a/libc/upstream-netbsd/extern.h b/libc/upstream-netbsd/extern.h index 942e237..616becd 100644 --- a/libc/upstream-netbsd/extern.h +++ b/libc/upstream-netbsd/extern.h @@ -17,6 +17,12 @@ #ifndef _BIONIC_NETBSD_EXTERN_H_included #define _BIONIC_NETBSD_EXTERN_H_included -// Placeholder. +#include <sys/cdefs.h> + +__BEGIN_DECLS + +const char* __strsignal(int, char*, size_t); + +__END_DECLS #endif diff --git a/tests/stubs_test.cpp b/tests/stubs_test.cpp index d2d0ad8..9daaa22 100644 --- a/tests/stubs_test.cpp +++ b/tests/stubs_test.cpp @@ -34,7 +34,7 @@ typedef enum { TYPE_APP } uid_type_t; -static void check_getpwnam(const char* username, int uid, uid_type_t uid_type) { +static void check_getpwnam(const char* username, uid_t uid, uid_type_t uid_type) { errno = 0; passwd* pwd = getpwuid(uid); ASSERT_TRUE(pwd != NULL); |