Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: sandbox/linux/seccomp-bpf/sandbox_bpf.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager_test.cc ('k') | ui/aura/root_window_host_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/sandbox_bpf.cc
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
index 49fdd86d4f4f1497b937219e535c82ef69d1ea28..f5de6afc7dd52b3714635e1cbb445e896e366645 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
@@ -38,21 +38,11 @@ namespace {
const int kExpectedExitCode = 100;
-template <class T>
-int popcount(T x);
-template <>
-int popcount<unsigned int>(unsigned int x) {
+int popcount(uint32_t x) {
return __builtin_popcount(x);
}
-template <>
-int popcount<unsigned long>(unsigned long x) {
- return __builtin_popcountl(x);
-}
-template <>
-int popcount<unsigned long long>(unsigned long long x) {
- return __builtin_popcountll(x);
-}
+#if !defined(NDEBUG)
void WriteFailedStderrSetupMessage(int out_fd) {
const char* error_string = strerror(errno);
static const char msg[] =
@@ -64,6 +54,7 @@ void WriteFailedStderrSetupMessage(int out_fd) {
HANDLE_EINTR(write(out_fd, "\n", 1))) {
}
}
+#endif // !defined(NDEBUG)
// We define a really simple sandbox policy. It is just good enough for us
// to tell that the sandbox has actually been activated.
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager_test.cc ('k') | ui/aura/root_window_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698