From patchwork Thu Nov 29 07:09:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1820571 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 35D803FC23 for ; Thu, 29 Nov 2012 07:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751258Ab2K2HJY (ORCPT ); Thu, 29 Nov 2012 02:09:24 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:58873 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100Ab2K2HJX (ORCPT ); Thu, 29 Nov 2012 02:09:23 -0500 Received: from axis700.grange (dslb-178-006-249-221.pools.arcor-ip.net [178.6.249.221]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0M3qBK-1TM1iq1hwI-00rQud; Thu, 29 Nov 2012 08:09:22 +0100 Received: by axis700.grange (Postfix, from userid 1000) id C863940B99; Thu, 29 Nov 2012 08:09:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id BC13A40B98 for ; Thu, 29 Nov 2012 08:09:21 +0100 (CET) Date: Thu, 29 Nov 2012 08:09:21 +0100 (CET) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Linux Media Mailing List Subject: [PATCH 3.7] media: sh-vou: fix compiler warnings Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:gn6YPzhg1jc70llQwoEBX1v0TDdaNOrJz6bxMw+Bknq dMSlfRM0t/BH03WRdFmKlASTw6a3gmxZdEGal3TN8txuqSQOf7 FimKLhtXphRS4/49TCtnmTDoX8NUXro6RfeQzyj+q79VLrPVBg cVztINuHwnjbJUEDtIVjroM+hMp+df//Xbu3GVOioLufOkiwtC zbCuWQWTclbUHvGyagkb13qeDi9ZqOxIGDRZVL0t3rj2WYcS1Q KU1MCAk80XfbRrORgpAX9xX9MvDgIwPoZfuga/AehHSJSvwNMT nshJm9HFJhi2Am7Y6BvMcoze0BLF/+xaXTlPPOL57wgewRPbJe ictPkSIiULxkQm28787ohHqlMnmzc3mPAr2FPY3e/ES/KG+vYa a3bQTOeUDBQAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org sh-vou causes several "may be used uninitialized" warnings. Even though they all are purely theoretical, it is better to fix them. Signed-off-by: Guennadi Liakhovetski --- I'll be pushing last-minute soc-camera+misc 3.7 fixes shortly, this patch will be there too. drivers/media/platform/sh_vou.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index a1c87f0..7494858 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c @@ -207,6 +207,7 @@ static void sh_vou_stream_start(struct sh_vou_device *vou_dev, #endif switch (vou_dev->pix.pixelformat) { + default: case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV16: row_coeff = 1; @@ -595,9 +596,9 @@ static void vou_adjust_input(struct sh_vou_geometry *geo, v4l2_std_id std) */ static void vou_adjust_output(struct sh_vou_geometry *geo, v4l2_std_id std) { - unsigned int best_err = UINT_MAX, best, width_max, height_max, - img_height_max; - int i, idx; + unsigned int best_err = UINT_MAX, best = geo->in_width, + width_max, height_max, img_height_max; + int i, idx = 0; if (std & V4L2_STD_525_60) { width_max = 858;