From d66be0ae6929fee064a229d6c6bac3a871aba137 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 5 Oct 2017 13:51:32 -0700 Subject: Use -Werror in frameworks/native/libs/gui and ui * Remove unused variable and function. * Suppress warning of unused return results. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: If6f445be1e7677a37bf780844a79b84d6d7e1c1e --- libs/gui/Surface.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/gui/Surface.cpp') diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index 7b2b5c37f1..5bee7a41f6 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -153,7 +153,10 @@ status_t Surface::getDisplayRefreshCycleDuration(nsecs_t* outRefreshDuration) { ATRACE_CALL(); DisplayStatInfo stats; - status_t err = composerService()->getDisplayStats(NULL, &stats); + status_t result = composerService()->getDisplayStats(NULL, &stats); + if (result != NO_ERROR) { + return result; + } *outRefreshDuration = stats.vsyncPeriod; -- cgit v1.2.3-59-g8ed1b