CE: Reduce scope of where -Wconversion is disabled
The local conversion warning have been addressed, and the only remaining
conversion warnings are in some of the header files that are included,
directly or indirectly.
Test: Builds
Bug: 129481165
Change-Id: If6b7b9055b17ef67872bb5e34a0ef090b1e1a768
diff --git a/services/surfaceflinger/CompositionEngine/src/RenderSurface.cpp b/services/surfaceflinger/CompositionEngine/src/RenderSurface.cpp
index e981172..660baff 100644
--- a/services/surfaceflinger/CompositionEngine/src/RenderSurface.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/RenderSurface.cpp
@@ -14,10 +14,6 @@
* limitations under the License.
*/
-// TODO(b/129481165): remove the #pragma below and fix conversion issues
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wconversion"
-
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#include <android-base/stringprintf.h>
@@ -29,6 +25,7 @@
#include <compositionengine/impl/DumpHelpers.h>
#include <compositionengine/impl/OutputCompositionState.h>
#include <compositionengine/impl/RenderSurface.h>
+
#include <log/log.h>
#include <renderengine/RenderEngine.h>
#include <sync/sync.h>
@@ -37,8 +34,15 @@
#include <ui/Rect.h>
#include <utils/Trace.h>
+// TODO(b/129481165): remove the #pragma below and fix conversion issues
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconversion"
+
#include "DisplayHardware/HWComposer.h"
+// TODO(b/129481165): remove the #pragma below and fix conversion issues
+#pragma clang diagnostic pop // ignored "-Wconversion"
+
namespace android::compositionengine {
RenderSurface::~RenderSurface() = default;
@@ -254,6 +258,3 @@
} // namespace impl
} // namespace android::compositionengine
-
-// TODO(b/129481165): remove the #pragma below and fix conversion issues
-#pragma clang diagnostic pop // ignored "-Wconversion"