Use -Werror in system/core/libpixelflinger
* Remove unused local variables.
* Suppress/fix warning of unused functions, conditionally used variables.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: If92bc79f15a0486364da0389defbb2d43b3bd6ea
diff --git a/libpixelflinger/codeflinger/texturing.cpp b/libpixelflinger/codeflinger/texturing.cpp
index 4c357af..e6997bd 100644
--- a/libpixelflinger/codeflinger/texturing.cpp
+++ b/libpixelflinger/codeflinger/texturing.cpp
@@ -41,7 +41,6 @@
void GGLAssembler::init_iterated_color(fragment_parts_t& parts, const reg_t& x)
{
context_t const* c = mBuilderContext.c;
- const needs_t& needs = mBuilderContext.needs;
if (mSmooth) {
// NOTE: we could take this case in the mDithering + !mSmooth case,
@@ -324,9 +323,7 @@
tex_coord_t* coords,
const reg_t& x, const reg_t& y)
{
- context_t const* c = mBuilderContext.c;
const needs_t& needs = mBuilderContext.needs;
- int Rctx = mBuilderContext.Rctx;
int Rx = x.reg;
int Ry = y.reg;
@@ -402,10 +399,6 @@
void GGLAssembler::build_textures( fragment_parts_t& parts,
Scratch& regs)
{
- context_t const* c = mBuilderContext.c;
- const needs_t& needs = mBuilderContext.needs;
- int Rctx = mBuilderContext.Rctx;
-
// We don't have a way to spill registers automatically
// spill depth and AA regs, when we know we may have to.
// build the spill list...
@@ -434,7 +427,6 @@
Spill spill(registerFile(), *this, spill_list);
- const bool multiTexture = mTextureMachine.activeUnits > 1;
for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT; i++) {
const texture_unit_t& tmu = mTextureMachine.tmu[i];
if (tmu.format_idx == 0)
@@ -442,7 +434,7 @@
pointer_t& txPtr = parts.coords[i].ptr;
pixel_t& texel = parts.texel[i];
-
+
// repeat...
if ((tmu.swrap == GGL_NEEDS_WRAP_11) &&
(tmu.twrap == GGL_NEEDS_WRAP_11))
@@ -656,7 +648,6 @@
void GGLAssembler::build_iterate_texture_coordinates(
const fragment_parts_t& parts)
{
- const bool multiTexture = mTextureMachine.activeUnits > 1;
for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT; i++) {
const texture_unit_t& tmu = mTextureMachine.tmu[i];
if (tmu.format_idx == 0)