[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21331.1276560832@localhost>
Date: Mon, 14 Jun 2010 20:13:52 -0400
From: Valdis.Kletnieks@...edu
To: "Justin P. Mattock" <justinmattock@...il.com>
Cc: linux-kernel@...r.kernel.org, reiserfs-devel@...r.kernel.org,
linux-bluetooth@...r.kernel.org, clemens@...isch.de,
debora@...ux.vnet.ibm.com, dri-devel@...ts.freedesktop.org,
linux-i2c@...r.kernel.org, linux1394-devel@...ts.sourceforge.net,
linux-media@...r.kernel.org
Subject: Re: [PATCH 4/8]drivers:tmp.c Fix warning: variable 'rc' set but not used
On Mon, 14 Jun 2010 13:26:44 PDT, "Justin P. Mattock" said:
> Im getting this warning when compiling:
> CC drivers/char/tpm/tpm.o
> drivers/char/tpm/tpm.c: In function 'tpm_gen_interrupt':
> drivers/char/tpm/tpm.c:508:10: warning: variable 'rc' set but not used
>
> The below patch gets rid of the warning,
> but I'm not sure if it's the best solution.
> rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE,
> "attempting to determine the timeouts");
> + if (!rc)
> + rc = 0;
> }
Good thing that's a void function. ;)
Unless transmit_cmd() is marked 'must_check', maybe losing the 'rc =' would
be a better solution?
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists