From 745c5f6ad01ece07b0163d0b5869994bceb26b1a Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Tue, 18 Nov 2014 20:00:41 -0800 Subject: [PATCH] kill HAVE_MADVISE Change to avoid "unused parameter" warning. Bug: 18397020 Change-Id: I4b26de55314c78237daead8e873385b97cafe4d4 --- libutils/FileMap.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libutils/FileMap.cpp b/libutils/FileMap.cpp index 71f00dc23..f49b4f94c 100644 --- a/libutils/FileMap.cpp +++ b/libutils/FileMap.cpp @@ -194,9 +194,9 @@ try_again: } // Provide guidance to the system. +#if !defined(_WIN32) int FileMap::advise(MapAdvice advice) { -#if !defined(_WIN32) int cc, sysAdvice; switch (advice) { @@ -214,7 +214,11 @@ int FileMap::advise(MapAdvice advice) if (cc != 0) ALOGW("madvise(%d) failed: %s\n", sysAdvice, strerror(errno)); return cc; -#else - return -1; -#endif } + +#else +int FileMap::advise(MapAdvice /* advice */) +{ + return -1; +} +#endif