From patchwork Mon Aug 29 18:58:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Schmidt X-Patchwork-Id: 17237 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 18350C3272 for ; Mon, 29 Aug 2022 18:59:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AABBE61FC2; Mon, 29 Aug 2022 20:59:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1661799543; bh=Ep/F8ywxEYci28rZy4z6A3Drx4kokNEZUWQ2TnmvhsI=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=UU8koiLgbT0JXNyRGfXxBBwUBA35ZwkVMbCnI4d6vCd13VtPODGHI7xz8izaNG9eT xeEdOgcbz6r0PsEnR2T0nP7X1HGgfXe9XkQIMDx/+RpjPgSVF7sbH448JpZdz4GA80 6+QHpnP3vYjJuMKStRdM+dxvvqIAeJwxc/FGDU0faWsnNyC2H6DmOEeoLwoTv4MtiJ C6FW+sjORFNKGaEU7bD0XfzqUyg7+ivbZOpzInWtSm8JwLwlv3MQwvquW+Ikfm1nZ7 CtINUqq0lVj1K3DvvtiN/UQU2Eta0tdykH6gYJ6i5o7vkjKjbVJO++lwnKVaQPURcS A30M/GWj+nIog== Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4753F61FBA for ; Mon, 29 Aug 2022 20:59:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GZPK23rT"; dkim-atps=neutral Received: by mail-ej1-x635.google.com with SMTP id y3so17606636ejc.1 for ; Mon, 29 Aug 2022 11:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=KYPO9091lscjawHuZzSZcftTdUaCoD2F4Td2XI55HEk=; b=GZPK23rTjP4TpSLJJAxH4fRjqGyugcm9LG7LxVqPU9TBc1B3PWlpKP2z8UK/QaOH5z eV76JNMWt6eGwACcPJn2tD0Nhp2JHvtWFDRPvFJz23KI+0POGjb9a9bsr1NZfVh3BUt4 E8IeHlJdeREV5rQy64oI/uvunfXDqaA8rPVamnwoDlOD8+V1u4Te7LV37QPRPfVX8U9G 8/EfjDMgdUTnkGFCW6FiUV8GnWUffOfnDMvb4TSDz6/y5D0MUEm1jXXkMArT4AgE6sSX x0Tq0Crhx5ec62dvrG1TR7yKqBmgaL2A6eiOT3MCvddCK7bLyyzvhCfZA3dYLLbb6int H1Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=KYPO9091lscjawHuZzSZcftTdUaCoD2F4Td2XI55HEk=; b=Ko0W1mc+Oitw3wCBkKrMQm451ZBO4y8DaNuyrt4AJUQ0DyJVZlXbgwqvm7rFR/sN1n 11tooIMDdUFAs3Zor5YZMQD5PZu7yJYyv/jnYdNBwuRaa9BEm3bLxwf6RHG2WL6How0h iZr8q/zAczUrrnTgYdQ74Aa6tKz3CQ0CLOzNKT2q2ktRxkiTPb+C7hR0irbhLOuQaRZf QueUcOnkC8qoeZEC5EHlhacUJW7EEkNiTjTMcl3RYYi7LKtHW2FbMEFEJS/WWCJND0Ob +OlOwIwLhF8MI2smn4iM1g3rSSy9z7Vz6TCBehby+Gsn9CutUKYR0g027NF+WAqjTCGU +jRg== X-Gm-Message-State: ACgBeo3G75DLditYL8M383rtmGh8kAhanEx91wlhceUc6fiExvVteZmy 4TdaZyJ8W1cQ1928cTvfzUDyRLflTIc= X-Google-Smtp-Source: AA6agR5lmP50Jly7/BP9yAVsRVRXfz5L41qhaYf8Z66NHWfeLkDFGgSqvK9BrmEX6s0mC/YNwfdb/w== X-Received: by 2002:a17:907:3d8b:b0:741:9f51:ac16 with SMTP id he11-20020a1709073d8b00b007419f51ac16mr3223738ejc.39.1661799541613; Mon, 29 Aug 2022 11:59:01 -0700 (PDT) Received: from pythagoras.local (dynamic-077-003-143-111.77.3.pool.telefonica.de. [77.3.143.111]) by smtp.gmail.com with ESMTPSA id 17-20020a170906211100b006fef0c7072esm4828136ejt.144.2022.08.29.11.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 11:59:01 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Aug 2022 20:58:47 +0200 Message-Id: <20220829185849.1884517-2-marvin.schmidt1987@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829185849.1884517-1-marvin.schmidt1987@gmail.com> References: <20220829185849.1884517-1-marvin.schmidt1987@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/3] test: camera: Remove redundant call of std::string::c_str() 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: Marvin Schmidt via libcamera-devel From: Marvin Schmidt Reply-To: Marvin Schmidt Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" libcamera::File::exists() takes a const reference to a std::string and clang-tidy's readability-redundant-string-cstr check warns about it: > ../test/camera/camera_reconfigure.cpp:182:21: warning: redundant call to 'c_str' [readability-redundant-string-cstr] > if (File::exists(pname.c_str())) { > ^~~~~~~~~~~~~ > pname Signed-off-by: Marvin Schmidt --- test/camera/camera_reconfigure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/camera/camera_reconfigure.cpp b/test/camera/camera_reconfigure.cpp index f6076baa..d12e2413 100644 --- a/test/camera/camera_reconfigure.cpp +++ b/test/camera/camera_reconfigure.cpp @@ -179,7 +179,7 @@ private: continue; string pname("/proc/" + string(ptr->d_name) + "/comm"); - if (File::exists(pname.c_str())) { + if (File::exists(pname)) { ifstream pfile(pname.c_str()); string comm; getline(pfile, comm);