From patchwork Thu Dec 6 22:27:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 11318 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 66B4044D5E8 for ; Fri, 7 Dec 2018 00:28:06 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B599B68A695; Fri, 7 Dec 2018 00:27:56 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FDD668A695 for ; Fri, 7 Dec 2018 00:27:49 +0200 (EET) Received: by mail-io1-f46.google.com with SMTP id l14so1723933ioj.5 for ; Thu, 06 Dec 2018 14:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=CZzz+QVjFSO1ZUmCfM5vkkas+1j6OMPrTS7Hbv2zTDU=; b=NxyzqPUraqGnftPRtzv0dNk+B3b45nsdOFm/bbdj9X6nm88BnfzTF7AuJ57Ay/3VWU F4Wq7O+bZngs5b4hRnyOZsXkPUka8+gZQNDyQnRQ9YFBr2LeLd1uUyUc1BfVJw7timcj KQSBHUuzBBybrEDkfmEjmCdwDtfk0CK4PpjCz27YB9AMpZah2P+sljXHSA0Jk6DDi1da 07s/Z6yfXJsP/utSdaVAXa8pOtKoqKW4TLb+qeE/cE3ZaXysu+2Tvv+8DZbAW6LIA6b1 nRv1/w0qUHtQBVAaoZjveCrglKbNBasCWBsHPCLiZ1s97zr3hKW3tpgy1cjpEY6vKjTO JWUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CZzz+QVjFSO1ZUmCfM5vkkas+1j6OMPrTS7Hbv2zTDU=; b=dv9ZDE85/UwLRg7ALe2Ig2ZIS/vNJJshDbVM56ggQjUPNcu5jc9tB5UVLtCtv2R+EA Y9eEodwltztno78tjH5A5Yd3nlLrU76Ik+0sk0MIlWGjhDwh9sETxM/Nl6cG/c3AonIB HW61S3ikfgJUrMiE07GcPHs+4rM4zGm7aeTXWKVOdZMbZ0HviptJxFMOPwpujAuize/Y JvIcq5/3n/4ZrNQXyfD78Rm6Db2RFkPWrsLPyzO3Wq5qP4ySI7LU7hZm6L/g7khlDRsE FQFBAxEvZlUBsVTKfON0wqIgcSgQSJWIYf4DENP6NQOEL62MIeNVSWogWr9IGhrniIcQ +z2g== X-Gm-Message-State: AA+aEWYBvdB4iZgGP8siEurpmyGH71qMEfoOLEkK8/G1XUc31ysz2NvG pY36ObhlmfB/Tt24/nIGjS0JnX1XHzcOL6bBvKSAKA== X-Google-Smtp-Source: AFSGD/V9fsisLtCNyIGyrEsbUL8Ax18aUHVMbgjNwdmRcc8UgACvhkdmT4gex2Qj7K6Vh2qFwp7nftpT4d8b+VuaRKE= X-Received: by 2002:a5d:9405:: with SMTP id v5mr26751813ion.250.1544135277708; Thu, 06 Dec 2018 14:27:57 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a02:5f11:0:0:0:0:0 with HTTP; Thu, 6 Dec 2018 14:27:56 -0800 (PST) From: Carl Eugen Hoyos Date: Thu, 6 Dec 2018 23:27:56 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavc/decode: Initialize a return value on get_format() error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch silences a clang warning, please comment. Carl Eugen From 3b5fc2473235410920ca89c7d84654e2ce8fb29d Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 6 Dec 2018 23:17:13 +0100 Subject: [PATCH] lavc/decode: Initialize return value for get_format() failure. Silences a warning: libavcodec/decode.c:1378:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is true --- libavcodec/decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index c89c77c..a32ff2f 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1378,6 +1378,7 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt) if (i == n) { av_log(avctx, AV_LOG_ERROR, "Invalid return from get_format(): " "%s not in possible list.\n", desc->name); + ret = AV_PIX_FMT_NONE; break; } -- 1.7.10.4