New issue
Advanced search Search tips

Issue 618537 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

cras_alsa_jack.c:596:6: error: variable 'r' set but not used

Project Member Reported by fbarchard@chromium.org, Jun 9 2016

Issue description

compile cras with gcc 4.9 aarch64

What is the expected output?
compiles

What do you see instead?
cras_alsa_jack.c:596:6: error: variable 'r' set but not used [-Werror=unused-but-set-variable]
  int r;
      ^
cc1: all warnings being treated as errors

This artical:
http://stackoverflow.com/questions/777261/avoiding-unused-variables-warnings-when-using-assert-in-a-release-build

suggest possible work arounds, including:
int Result = Func();
if ( Result == 1 )
{
    assert( 0 );
}



 

Comment 1 by hychao@chromium.org, Jun 13 2016

I don't see compile problem on Tot. Can you attach your full compile output?

Comment 2 by dgreid@chromium.org, Jun 27 2016

Status: Verified (was: Untriaged)
thanks Frank.

7280399c61bceed279485c093d7921a21f144574 CRAS: Fix for Brillo release build warning on unused variable.

Sign in to add a comment