From patchwork Tue Feb 18 19:39:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 183613 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp6487722ile; Tue, 18 Feb 2020 11:41:55 -0800 (PST) X-Google-Smtp-Source: APXvYqwCzZQ8nUJlm1MgPGm30NhXg4Nw/26nNkjBIQrHdGXvT6BDKde5GNdR94YIWZ61RVL6bEa8 X-Received: by 2002:ac8:592:: with SMTP id a18mr19165886qth.107.1582054915005; Tue, 18 Feb 2020 11:41:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582054915; cv=none; d=google.com; s=arc-20160816; b=y6ZRYkM44c4F9yBFjPF2yRpC2qncVJlS+weAwbgiE72560+KJ6sGq/WB7NtutzTDD2 vWXJghvRZH33H8T/afTaACaW6IzCJ/u/z4aUyLG1C1j40xmgJ5n4/b8vwyYIy2ui2mW6 ic6Iph1pq5auMevkqC5HJpj++Z1/qPnAGwyQWKZkwUQyiCY99xZ3tY3KWvrTxmn5/f8M LDjssHfyDRnNMU/9xP1AkfPk8FympETuLXiEKElCxqGQnROU7JGdoqhuIPJZ5/Ye0gOn stUeMWLyTfhDuLy60c3ZdcB2r0TjRY+QtyZreGUYIiuyytHyohoIzUqLzBsRYVWHcBCJ 69tQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jAN9/5WEnE9dxJr6iL5ixKsH798kIxR23zQ9JVcmqi8=; b=kRG9AojWYGwf4sl+rFKIwA5pprBQ/cQCHoMRyNq2qMCs/u8u8jnsqatcqKQavqY60m YdwXfmqDOXIicBPwEwMLqNrbBGEijKB3Amu3OHZWlfoAyANjfZ6jgdRNNxhW0wp7vTRM DeaS+OjX6gD4idjnJ0eIQFslTDkXihToYiTDzr9CEG9CcLyUrh1q0RuMcz+Lejk4I0s4 5tY1emXmA+yAIySTfQ8RkpPBcywI52tc5wEQ8EQ3Sceee6lroejRB9p/Biu7uL8ZHE1+ qqrmZvtYnokkC10SkEPWvsTV3/AexkSZbZJ4/fFFmj1gtgNJS8fQqmE495jHtyUY651o LW6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="fXerTJA/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a16si2129476qtw.15.2020.02.18.11.41.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Feb 2020 11:41:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=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=@linaro.org header.s=google header.b="fXerTJA/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48kk-0007J3-Fi for patch@linaro.org; Tue, 18 Feb 2020 14:41:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55133) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48ia-0003fd-Pa for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48iZ-0004O4-NB for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:40 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:42681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48iZ-0004M7-GT for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:39 -0500 Received: by mail-pf1-x42e.google.com with SMTP id 4so11147922pfz.9 for ; Tue, 18 Feb 2020 11:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jAN9/5WEnE9dxJr6iL5ixKsH798kIxR23zQ9JVcmqi8=; b=fXerTJA/78ZheSMhs2rpB8CviX/9SYutyA4Ct9KpYId2tli/PRUoCCi+a97qP4X0en KEZjvDulRV9zO09FuiTuPnXYblt3B0iHwv8CJQlTU+Ch1UbHqroqTSs481vcjT7rkDVn zsmr/cDLeB/ueyBN7JLkhkcJ03UzOcdMxy+qVL6u+lOCYTyn7z2y2sednQknpOXMn1Gj X1bDkwftYSlYkcOR1Gcb6NGnp/rTNEA+KsyS/MH/9jGAVYDBXm3//V1S7xGpwKUbtO05 rHHE8ctINLN2TIM0DOIWQW4ND6PjP88d5K6uDbkwIKbY9GWEgv0li61svmRvLkHw4nh/ Tlfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jAN9/5WEnE9dxJr6iL5ixKsH798kIxR23zQ9JVcmqi8=; b=Yf1wQjihJsCu3EaqGuDgfFZf7+D5ChQOkctG/J5xkDHegnCvC1Y8NYCxDSbU2h9Blv 74IvY51N45IeZbQ89iZCVHJD/yS5QBkD8nfbKaHaDeLiKxyP/WsISmjmHyp9uITduyJq N+AY2OjwtHaP//KM1+N2HZJW1ZDDWaZWXK+7x25NRl/lr3GkAVeYpm8RfjPrlC6TpL/8 j+vxRkYBhruKEohi1mdCTk8kcjwm7BnAkJm+sszZb2wbsgSOePOUjHzH22l3kg4aDOtW kLwhO+SNNdQSn8HVGpNAH/ktn/Zxi5gNBtupqCxS9Xr4eUsXrFB2LDIaQu2D2F+ELYso Tcsw== X-Gm-Message-State: APjAAAVNUOdHy1G2zvcrQKSpBAKsXhJET6WvSrkv7VeTk8xOjdHMBAQq JPLCO+jU9C3iq/ThZi402gC09MKBum8= X-Received: by 2002:a63:6407:: with SMTP id y7mr24377957pgb.45.1582054778035; Tue, 18 Feb 2020 11:39:38 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 5/9] hw/display/artist: Remove dead code (CID 1419388 & 1419389) Date: Tue, 18 Feb 2020 11:39:25 -0800 Message-Id: <20200218193929.11404-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42e X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Coverity reports: *** CID 1419388: Control flow issues (DEADCODE) /hw/display/artist.c: 739 in draw_line_xy() 733 if (endy < 0) { 734 endy = 0; 735 } 736 737 738 if (endx < 0) { >>> CID 1419388: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return;". 739 return; 740 } 741 742 if (endy < 0) { 743 return; 744 } *** CID 1419389: Control flow issues (DEADCODE) /hw/display/artist.c: 743 in draw_line_xy() 737 738 if (endx < 0) { 739 return; 740 } 741 742 if (endy < 0) { >>> CID 1419389: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return;". 743 return; 744 } 745 746 trace_artist_draw_line(startx, starty, endx, endy); 747 draw_line(s, startx, starty, endx, endy, false, -1, -1); 748 } Fixes: Covertiy CID 1419388 and 1419389 (commit 4765384ce33) Signed-off-by: Philippe Mathieu-Daudé Acked-by: Sven Schnelle Message-Id: <20200214001303.12873-6-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/display/artist.c | 9 --------- 1 file changed, 9 deletions(-) -- 2.20.1 diff --git a/hw/display/artist.c b/hw/display/artist.c index 5492079116..753dbb9a77 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -734,15 +734,6 @@ static void draw_line_xy(ARTISTState *s, bool update_start) endy = 0; } - - if (endx < 0) { - return; - } - - if (endy < 0) { - return; - } - draw_line(s, startx, starty, endx, endy, false, -1, -1); }