From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valdis.Kletnieks-PjAqaU27lzQ@public.gmane.org Subject: Re: [PATCH 4/8]drivers:tmp.c Fix warning: variable 'rc' set but not used Date: Mon, 14 Jun 2010 20:13:52 -0400 Message-ID: <21331.1276560832@localhost> References: <1276547208-26569-1-git-send-email-justinmattock@gmail.com> <1276547208-26569-5-git-send-email-justinmattock@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1276560832_4535P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Your message of "Mon, 14 Jun 2010 13:26:44 PDT." <1276547208-26569-5-git-send-email-justinmattock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: "Justin P. Mattock" Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, reiserfs-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, clemens-P6GI/4k7KOmELgA04lAiVw@public.gmane.org, debora-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux1394-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org --==_Exmh_1276560832_4535P Content-Type: text/plain; charset=us-ascii 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? --==_Exmh_1276560832_4535P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFMFsW/cC3lWbTT17ARAozXAKDUzsPJ5qGjLthg1WUw+ja58I+MOwCfeVvx zBQCgslSY2ar/mPFtJHVUAA= =j1Q9 -----END PGP SIGNATURE----- --==_Exmh_1276560832_4535P--