summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/debug/stack_trace_posix.cc4
-rw-r--r--build/common.gypi4
-rw-r--r--net/url_request/url_request_unittest.cc40
-rw-r--r--sql/recovery_unittest.cc2
4 files changed, 29 insertions, 21 deletions
diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc
index 731fb39..ed1a918 100644
--- a/base/debug/stack_trace_posix.cc
+++ b/base/debug/stack_trace_posix.cc
@@ -179,6 +179,7 @@ void PrintToStderr(const char* output) {
ignore_result(HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output))));
}
+#if !defined(OS_IOS)
void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
// NOTE: This code MUST be async-signal safe.
// NO malloc or stdio is allowed here.
@@ -371,6 +372,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
#endif // defined(OS_MACOSX)
_exit(1);
}
+#endif // !defined(OS_IOS)
class PrintBacktraceOutputHandler : public BacktraceOutputHandler {
public:
@@ -401,6 +403,7 @@ class StreamBacktraceOutputHandler : public BacktraceOutputHandler {
DISALLOW_COPY_AND_ASSIGN(StreamBacktraceOutputHandler);
};
+#if !defined(OS_IOS)
void WarmUpBacktrace() {
// Warm up stack trace infrastructure. It turns out that on the first
// call glibc initializes some internal data structures using pthread_once,
@@ -433,6 +436,7 @@ void WarmUpBacktrace() {
// #22 <signal handler called>
StackTrace stack_trace;
}
+#endif // !defined(OS_IOS)
} // namespace
diff --git a/build/common.gypi b/build/common.gypi
index d0f9f22..9bdc67b 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -4278,8 +4278,8 @@
# Don't die on dtoa code that uses a char as an array index.
# This is required solely for base/third_party/dmg_fp/dtoa.cc.
'-Wno-char-subscripts',
- # Clang spots more unused functions. TODO: remove, crbug.com/315884
- '-Wno-unused-function',
+ # See comment in the mac clang section above for this flag.
+ '-Wno-unneeded-internal-declaration',
# Match OS X clang C++11 warning settings.
'-Wno-c++11-narrowing',
],
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index dd7dc77..7087f89 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -161,6 +161,26 @@ void TestLoadTimingReusedWithProxy(
// Tests load timing information in the case of a cache hit, when no cache
// validation request was sent over the wire.
+base::StringPiece TestNetResourceProvider(int key) {
+ return "header";
+}
+
+void FillBuffer(char* buffer, size_t len) {
+ static bool called = false;
+ if (!called) {
+ called = true;
+ int seed = static_cast<int>(Time::Now().ToInternalValue());
+ srand(seed);
+ }
+
+ for (size_t i = 0; i < len; i++) {
+ buffer[i] = static_cast<char>(rand());
+ if (!buffer[i])
+ buffer[i] = 'g';
+ }
+}
+
+#if !defined(OS_IOS)
void TestLoadTimingCacheHitNoNetwork(
const net::LoadTimingInfo& load_timing_info) {
EXPECT_FALSE(load_timing_info.socket_reused);
@@ -198,10 +218,6 @@ void TestLoadTimingNoHttpResponse(
EXPECT_TRUE(load_timing_info.receive_headers_end.is_null());
}
-base::StringPiece TestNetResourceProvider(int key) {
- return "header";
-}
-
// Do a case-insensitive search through |haystack| for |needle|.
bool ContainsString(const std::string& haystack, const char* needle) {
std::string::const_iterator it =
@@ -213,21 +229,6 @@ bool ContainsString(const std::string& haystack, const char* needle) {
return it != haystack.end();
}
-void FillBuffer(char* buffer, size_t len) {
- static bool called = false;
- if (!called) {
- called = true;
- int seed = static_cast<int>(Time::Now().ToInternalValue());
- srand(seed);
- }
-
- for (size_t i = 0; i < len; i++) {
- buffer[i] = static_cast<char>(rand());
- if (!buffer[i])
- buffer[i] = 'g';
- }
-}
-
UploadDataStream* CreateSimpleUploadData(const char* data) {
scoped_ptr<UploadElementReader> reader(
new UploadBytesElementReader(data, strlen(data)));
@@ -277,6 +278,7 @@ bool FingerprintsEqual(const HashValueVector& a, const HashValueVector& b) {
return true;
}
+#endif // !defined(OS_IOS)
// A network delegate that allows the user to choose a subset of request stages
// to block in. When blocking, the delegate can do one of the following:
diff --git a/sql/recovery_unittest.cc b/sql/recovery_unittest.cc
index fc7c2f2..cc06090 100644
--- a/sql/recovery_unittest.cc
+++ b/sql/recovery_unittest.cc
@@ -48,6 +48,7 @@ std::string GetSchema(sql::Connection* db) {
return ExecuteWithResults(db, kSql, "|", "\n");
}
+#if !defined(USE_SYSTEM_SQLITE)
int GetPageSize(sql::Connection* db) {
sql::Statement s(db->GetUniqueStatement("PRAGMA page_size"));
EXPECT_TRUE(s.Step());
@@ -90,6 +91,7 @@ bool WritePage(const base::FilePath& path, size_t page_no,
return false;
return true;
}
+#endif // !defined(USE_SYSTEM_SQLITE)
class SQLRecoveryTest : public testing::Test {
public: