From patchwork Thu Apr 21 17:25:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Utkarsh Tiwari X-Patchwork-Id: 15701 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 06B04C3256 for ; Thu, 21 Apr 2022 17:26:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B1C0465647; Thu, 21 Apr 2022 19:26:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1650561972; bh=B605x6FDZziCnsyZtxZl3XDoBxUCCH++SlJRlt2ed9k=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Em71KWjvbly/nWhL/y9EEfNj74hA2BB+HkneMucuVViQABifYeK4IIRJRSAv/FzNR 872E3DNCmhpVQYE02WNiw2Sk7dFcIJ0lp1TtokxrjtTg9k2Jg8Sih5F9ojTTAloX6u ZLIZBjOg8VrKwlUUMs5tyoXaY3mg0lJuP+ztPMM68kIFwu4p3WQIGRttFKgx0IvrYx NHLPH3tjnhvZPrslrk7i6LfTPjTt0cI4J/O4zxhJ6yZqYnNhvkSTYpx2A2vfIbFnOu HUiOFMzOV7E2Zk26dJcENuwZEGH8loCpRkziUHnoqSTBvSOmsNfcfZ0ISJWxmAN5jS /ozC4Hu7wL3YA== Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 27B4A6563D for ; Thu, 21 Apr 2022 19:26:11 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RH1W+V3b"; dkim-atps=neutral Received: by mail-pl1-x62c.google.com with SMTP id q1so4324742plx.13 for ; Thu, 21 Apr 2022 10:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tjDgSZHigoB2liOF7pVd99zsUk3oR30dd+oovknN5ac=; b=RH1W+V3bK4XkJ8bZA9Bsyn2QHVFww5i1JsAmGgq7OD+Txwl9iTNooA607XXWN1KqnX I5UlzukPiXDWihsfWLNFx8Jo3Am5TB7wYDTju1fwXXCZb0YDVd5AmIqmouA8NMFjPOyK E6C3pemp2oOt6KHT1oQoc412v3MgOx83bPodCCBnFgwRw2x9d5DbGRN6BJ0OQe6ckTY2 du8H419vifYgFVFmysBjpjl01O9uNSKSEprGZZgg/bQPc69GY2sojCXgGWGQUsSzoa3W nUxAFhta8HTDYtDSwwz5lpWyHkN0lh9g58fy56YzTNAX3vvoFJMZmcfjZZKRrPw2nEVb ywPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tjDgSZHigoB2liOF7pVd99zsUk3oR30dd+oovknN5ac=; b=0R9qTyNBv8umvcNR397AGr7/C5tHmcw2g1tiMCa4ThCM2ODYGcV+WC2Ka4VTHBWODd y1hSYX5SAMwTH3XEqZoThsC+XlTfeaO/ansWYkZIwqZ96iPXuSxjUhq5X+RppzaUrLQf xKcAqsygTWI1NAsDZMFpb9iBGlKpFR/MGXUyYNbobstk24Ee1nsWCnrIPna3GGNXICjV y5rwdnK9CJPI/yl+0WmPqhcTWOR0EkyurmfzNuG+HCHxDjj5aAwX1sJuOHYHjYuPadNz UpIxAYK34YY0Nfkc3p1+460sggkkD74SfThE4RZBwCTOOflRU5Fzzqw970BGEN29m6ka GDGA== X-Gm-Message-State: AOAM532Fb6/k9fVMgp5KjVYujHCUPgJYbEB+8mGTGT9MlbLgyogWFoJy CYIRmSTzpQskDQaYioZDyy8ym4CbILT4ow== X-Google-Smtp-Source: ABdhPJx1UYeyvACvx2SXunOEwWrCwoET/Zj6x8nyy2P8fnrrjdPaIE3uMddLu7qRxdWY+WtdMlwQSQ== X-Received: by 2002:a17:903:2cf:b0:151:a932:f1f0 with SMTP id s15-20020a17090302cf00b00151a932f1f0mr564719plk.130.1650561968553; Thu, 21 Apr 2022 10:26:08 -0700 (PDT) Received: from localhost.localdomain ([2404:bd00:3:db75:9357:7a99:9595:33ae]) by smtp.gmail.com with ESMTPSA id iy2-20020a17090b16c200b001d75aabe050sm1080174pjb.34.2022.04.21.10.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 10:26:08 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 21 Apr 2022 22:55:49 +0530 Message-Id: <20220421172549.138360-2-utkarsh02t@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421172549.138360-1-utkarsh02t@gmail.com> References: <20220421172549.138360-1-utkarsh02t@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] Explicit cast to int X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Utkarsh Tiwari via libcamera-devel From: Utkarsh Tiwari Reply-To: Utkarsh Tiwari Cc: Utkarsh Tiwari Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" After introduction of float values to options the conversion of unsigned int to int or vice versa is regarded as the same rank as conversion to and from float. Fix this by using an explicit cast Signed-off-by: tag. --- src/cam/stream_options.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp index 150bd27c..83d216b7 100644 --- a/src/cam/stream_options.cpp +++ b/src/cam/stream_options.cpp @@ -90,8 +90,8 @@ int StreamKeyValueParser::updateConfiguration(CameraConfiguration *config, StreamConfiguration &cfg = config->at(i++); if (opts.isSet("width") && opts.isSet("height")) { - cfg.size.width = opts["width"]; - cfg.size.height = opts["height"]; + cfg.size.width = static_cast(opts["width"]); + cfg.size.height = static_cast(opts["height"]); } if (opts.isSet("pixelformat"))