From patchwork Tue Sep 26 16:33:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 9972321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BE7FF60393 for ; Tue, 26 Sep 2017 16:35:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE96728DD9 for ; Tue, 26 Sep 2017 16:35:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A32B928ECF; Tue, 26 Sep 2017 16:35:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5861C28E8E for ; Tue, 26 Sep 2017 16:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968960AbdIZQf4 (ORCPT ); Tue, 26 Sep 2017 12:35:56 -0400 Received: from guitar.tcltek.co.il ([192.115.133.116]:50075 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968950AbdIZQfz (ORCPT ); Tue, 26 Sep 2017 12:35:55 -0400 Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 39C8F440782; Tue, 26 Sep 2017 19:35:54 +0300 (IDT) From: Baruch Siach To: Hans Verkuil , Adam Jackson Cc: Linux Media Mailing List , Baruch Siach Subject: [PATCH 2/3] edid-decode: detailed_block: fix maybe uninitialized warning Date: Tue, 26 Sep 2017 19:33:39 +0300 Message-Id: <0a16965a4be05dfd4e6c6425a12597f18261c8dc.1506443620.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.14.1 In-Reply-To: <07a4901aea4f30db053028fd3a84806b7777ef64.1506443620.git.baruch@tkos.co.il> References: <07a4901aea4f30db053028fd3a84806b7777ef64.1506443620.git.baruch@tkos.co.il> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the following warnings: edid-decode.c: In function ‘detailed_block’: edid-decode.c:394:2: warning: ‘width’ may be used uninitialized in this function [-Wmaybe-uninitialized] edid-decode.c:394:2: warning: ‘ratio’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Baruch Siach --- edid-decode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/edid-decode.c b/edid-decode.c index 3df35ec6d07f..4abd79333d61 100644 --- a/edid-decode.c +++ b/edid-decode.c @@ -348,6 +348,10 @@ detailed_cvt_descriptor(unsigned char *x, int first) width = 8 * (((height * 15) / 9) / 8); ratio = "15:9"; break; + default: + width = 0; + ratio = "unknown"; + break; } if (x[1] & 0x03)