From patchwork Wed Sep 22 08:59:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 1531138 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=VX0Wn6qd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HDsgp73GMz9sSn for ; Wed, 22 Sep 2021 19:00:06 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mSy6k-00058u-RE; Wed, 22 Sep 2021 09:00:02 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mSy6j-00057q-6B for fwts-devel@lists.ubuntu.com; Wed, 22 Sep 2021 09:00:01 +0000 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id D5BB33F238; Wed, 22 Sep 2021 08:59:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632301199; bh=pzSPmvSbuzFovmukkoOoqGIN567AK3PsYQLO0onnsHk=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=VX0Wn6qdBZDwm2bJKIqKDiTHxlaIobpEQ2UIOTnGEZRvM49F2+MiTVAkbJLtTt+Fb AhAkrq3tfUuKw+prn0A7xpf0q+5xfurXuJRD2siSv4KleiWqrA8/62zUOjcKwJ8fdl 4v0K349yjEVl2WMVLR31uTGoy+j7fqyHgOvW03PKFjvGeMbMk6V+lkgo6mX60UUn/6 7aK2AqeoZMLoTb8d7OmMdM0tpnZextacHzs+b2l9HawD+CFbyVDyIKFvQS5aCFpsV+ bwKDfAVl5XKjf3nHM2o8oIgYbpCvuVUJa80J3oNnP9SbK1rFVr5XEoMEEuWN8rrGNM bcXwJ+P/RQVdw== From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: s3power: clean up pedantic static analysis warnings Date: Wed, 22 Sep 2021 09:59:59 +0100 Message-Id: <20210922085959.115393-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Colin Ian King Static analysis is warning that variable status may be uninitialized. Clean this up by setting the variable to FWTS_OK. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/acpi/s3power/s3power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acpi/s3power/s3power.c b/src/acpi/s3power/s3power.c index f47ff8bb..4633ef30 100644 --- a/src/acpi/s3power/s3power.c +++ b/src/acpi/s3power/s3power.c @@ -176,7 +176,7 @@ static int wrap_pmutils_do_suspend(fwts_pm_method_vars *fwts_settings, int *duration, const char *command) { - int status; + int status = FWTS_OK; fwts_progress_message(fwts_settings->fw, percent, "(Suspending)"); time(&(fwts_settings->t_start));