Received: by 2002:a19:5509:0:0:0:0:0 with SMTP id n9csp2848541lfe; Sat, 21 Mar 2020 22:38:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt/2cXRZ1DzYikoGmqJx22jgdKISHP9UP30zelqBgIAhiOuGLc+RFHx+Qpxj3v6bPAo1qX3 X-Received: by 2002:aed:3a89:: with SMTP id o9mr16148664qte.375.1584855515096; Sat, 21 Mar 2020 22:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584855515; cv=none; d=google.com; s=arc-20160816; b=b6/M7INoSaErlRWCT4N1WF8HJqArmy60yvDkpD4ZpxVl1H3I0j9KimwNmk0RsxW1Ns SCeY0xmZyVBf9FMZATVTseDoDEXzrn8yqEVdmp8Iyc+q9fwtY8UW3Ethg0Cdxrsvw8m5 cPvaQdAV9VSj3NS7oI2VZjTZLWXMccqWzVPVZFOeDF7joVRGJ2f+o1a9QqbWmjcWdb1J T4GyuB1s+8/Dbs4Ozdi6dB/TWq8OtVrwRZUuUUiAR3+9A2zU3JhkYMnchb8bSmvk7QAy 4Mrhke+727y0JbQ3SCddEUa/qtl1Ai7LTdfmHiLL9ugRJMiTR4C5ar9B3yu7FVCjc+yo 7uLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=9Tvw812LK0rtQ/PoEm8y6jTvq70bzs0+wmVL+GQ320g=; b=PYDsk57Fpf2y560QthUDbp1wOdxCsrBYHShzjTD6tj3fjxU+JArdE0MHIXY+bGcUiY deKaOg484ZOSapzDrLgdNyNTYmgQ2BXbCcK480R8dLfSUmRfGN36BYeJfZDcFPBJMlGK pq9W6ePgpat8dqxSXQ3xcfzDS05s+sxhpclU6e0MiEw1nmmJNQ+8adfhMNKwuOjNXFyv EcVXeC1FSMu3iUCaj+JWf0ts71Qb5mrX0mZQB8qFBSVI390YuL0faMxvy9rVHGNHM/Lh FI0+xtidmuiSY7uZQh2xfEs9r+tKRVUXU1Gt/c1PRknpKC5ml2Dk73nK8s6ZKohlE0Lg W5oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gibson.dropbear.id.au header.s=201602 header.b=XpIu+4ML; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o12si6844081qto.164.2020.03.21.22.38.34 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Mar 2020 22:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gibson.dropbear.id.au header.s=201602 header.b=XpIu+4ML; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1]:43386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFtJi-0006jT-Hs for alex.bennee@linaro.org; Sun, 22 Mar 2020 01:38:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33574) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFtJL-0006j3-Fk for qemu-arm@nongnu.org; Sun, 22 Mar 2020 01:38:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFtJK-0007nN-07 for qemu-arm@nongnu.org; Sun, 22 Mar 2020 01:38:11 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:39211 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFtJJ-0007jL-4J; Sun, 22 Mar 2020 01:38:09 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 48lR9x0slYz9sPF; Sun, 22 Mar 2020 16:37:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1584855477; bh=F4WJjh+4C1y+czVXBLaP8DstTq8ObneFRp7nfValy5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XpIu+4MLnl+yeZ0C79fkefwDvOHeyInEHL+0sw6eWx06219QTexLt1cOQjy19sznI v2cqQeKn20S1uUvk/pt6C4lVITzJlwdTfPpUEX8fYqcCLUYPmuJje/XZnKgnvhudZy cq1Wxqfi/ZnXMHnppCskKhelGUWss3OPHzvl+FNU= Date: Sun, 22 Mar 2020 16:34:27 +1100 From: David Gibson To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH-for-5.0 v2 04/11] hw/input/adb-kbd: Remove dead assignment Message-ID: <20200322053427.GH781112@umbus.fritz.box> References: <20200321144110.5010-1-philmd@redhat.com> <20200321144110.5010-5-philmd@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CNK/L7dwKXQ4Ub8J" Content-Disposition: inline In-Reply-To: <20200321144110.5010-5-philmd@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-devel@nongnu.org, BALATON Zoltan , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?iso-8859-1?Q?Herv=E9?= Poussineau , Joel Stanley , Andrzej Zaborowski , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?iso-8859-1?Q?C=E9dric?= Le Goater , John Snow , Kevin Wolf , Andrew Jeffery , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: tZ25xm7P+SEf --CNK/L7dwKXQ4Ub8J Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 21, 2020 at 03:41:03PM +0100, Philippe Mathieu-Daud=E9 wrote: > Since commit 5a1f49718 the 'olen' variable is not really > used. Remove it to fix a warning reported by Clang static > code analyzer: >=20 > CC hw/input/adb-kbd.o > hw/input/adb-kbd.c:200:5: warning: Value stored to 'olen' is never read > olen =3D 0; > ^ ~ >=20 > Fixes: 5a1f49718 (adb: add support for QKeyCode) > Reported-by: Clang Static Analyzer > Suggested-by: BALATON Zoltan > Signed-off-by: Philippe Mathieu-Daud=E9 Acked-by: David Gibson > --- > v2: Remove 'olen' (Zoltan) > --- > hw/input/adb-kbd.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) >=20 > diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c > index 0ba8207589..a6d5c9b7c9 100644 > --- a/hw/input/adb-kbd.c > +++ b/hw/input/adb-kbd.c > @@ -195,9 +195,7 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf) > { > KBDState *s =3D ADB_KEYBOARD(d); > int keycode; > - int olen; > =20 > - olen =3D 0; > if (s->count =3D=3D 0) { > return 0; > } > @@ -216,7 +214,6 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf) > if (keycode =3D=3D 0x7f) { > obuf[0] =3D 0x7f; > obuf[1] =3D 0x7f; > - olen =3D 2; > } else { > obuf[0] =3D keycode; > /* NOTE: the power key key-up is the two byte sequence 0xff 0xff; > @@ -224,10 +221,9 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf) > * byte, but choose not to bother. > */ > obuf[1] =3D 0xff; > - olen =3D 2; > } > =20 > - return olen; > + return 2; > } > =20 > static int adb_kbd_request(ADBDevice *d, uint8_t *obuf, --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --CNK/L7dwKXQ4Ub8J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAl52+OMACgkQbDjKyiDZ s5J3ihAAyQdD4J2JEB7fYHRvYktz4BhNLIrD6t2qFSAUGeBC2CU+FA4jy4r3qRy8 bk2AWU8o2poFSBT0CCYUZeGuFEPf1MkxZt3p6saNZVk0IX5q3z3WR2d9z+p6veWG rUzXkpbraEZcI5QHQ+iG9iapqikWxmc4GMQAxD4FFRrSwkju9dTQDN4zlLXs7hhL YGaQWoIcnfhMQBeM1QFV2mSF4M+SoTTp8RCNsteZAPqf0LAY6BJ3iVb8tH9dpoaO qEv5Pyjgcs9IeYore+VR67yLq3dSMdKgryO35OBk2EQKrI+2xXjGt8ehECFgDNBt JULe0H3mGq3EXefuKPTby5NReZaKIWDgtoTuzycDT4F1JERG/kCfUpEcKbjwS3N1 yJsCMshYqqSS1yBfEe0MXi453m8h6N+jzXIQAJXhFVqiyb3mIG2FENNu7g78TMiD dN9L8f5lnhRxk0pZXzsOjCjyE9fkthUBU3UBE7xAyHczIaQ/+5nPjr2kKRkjc+Rw RkLHCEfHMaJA81znCp6sQhQ5EKskkIVZxvIrdsRpweydRNUNfvdZtF6EGpJBStEc btANFqt7dcMWVjxukE711vQJoq1A1k8IulwkkolJB+jnRq2TadAloQjhMdRSPiLE CPUAX76wERETZC6h/hgmHd7PzQSFXT6J9gmP1ziJ62ibcLpda1A= =8mA0 -----END PGP SIGNATURE----- --CNK/L7dwKXQ4Ub8J--