qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] libcacard/cac: Remove unused statement (value stored is never read)
@ 2013-11-17 21:11 Stefan Weil
  2013-12-02 17:07 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2013-11-17 21:11 UTC (permalink / raw)
  Cc: qemu-trivial, Stefan Weil, qemu-devel

Warning from ccc-analyzer:

libcacard/cac.c:192:13: warning: Value stored to 'ret' is never read
            ret = VCARD_DONE;
            ^     ~~~~~~~~~~

Here 'ret' is assigned a value inside of a switch statement and also after
that switch statement.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---

This patch is not needed for 1.7 (although I think that it is safe).

 libcacard/cac.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libcacard/cac.c b/libcacard/cac.c
index 7a06b5a..74ef3e3 100644
--- a/libcacard/cac.c
+++ b/libcacard/cac.c
@@ -189,7 +189,6 @@ cac_applet_pki_process_apdu(VCard *card, VCardAPDU *apdu,
             pki_applet->sign_buffer = sign_buffer;
             pki_applet->sign_buffer_len = size;
             *response = vcard_make_response(VCARD7816_STATUS_SUCCESS);
-            ret = VCARD_DONE;
             break;
         case 0x00:
             /* we now have the whole buffer, do the operation, result will be
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] libcacard/cac: Remove unused statement (value stored is never read)
  2013-11-17 21:11 [Qemu-devel] [PATCH] libcacard/cac: Remove unused statement (value stored is never read) Stefan Weil
@ 2013-12-02 17:07 ` Michael Tokarev
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2013-12-02 17:07 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

18.11.2013 01:11, Stefan Weil wrote:
> Warning from ccc-analyzer:
> 
> libcacard/cac.c:192:13: warning: Value stored to 'ret' is never read
>             ret = VCARD_DONE;
>             ^     ~~~~~~~~~~
> 
> Here 'ret' is assigned a value inside of a switch statement and also after
> that switch statement.

Applied to trivial patches, thank you!

/mjt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-02 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-17 21:11 [Qemu-devel] [PATCH] libcacard/cac: Remove unused statement (value stored is never read) Stefan Weil
2013-12-02 17:07 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).