From patchwork Wed Apr 29 04:06:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 11516001 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E68A913 for ; Wed, 29 Apr 2020 04:06:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B19D206B8 for ; Wed, 29 Apr 2020 04:06:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D7/Gvgwo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725844AbgD2EGb (ORCPT ); Wed, 29 Apr 2020 00:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725497AbgD2EGb (ORCPT ); Wed, 29 Apr 2020 00:06:31 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ABB8C03C1AC for ; Tue, 28 Apr 2020 21:06:31 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id e6so239662pjt.4 for ; Tue, 28 Apr 2020 21:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KRbveXH9nYptpFO3zn7yIEQdAEH/boC3EqerFhZxVaI=; b=D7/GvgwoTtnzblBQKjhVlZSoQXZNmiBAjfKshzSTb6XNzwg5DiojuGyszqcGxgdehD D+n9Bxp6Nq01raWVYwD8fHyfgw1tLS2KFG7mDKLOsGAMGrQUs3pk6PTEi/rab1K+67AQ m8xCOPGcgBrn/Er9pOXsKBJ9aGe7CxtF8qFX8Lx2odcBQiTaj/Rzjin/4RvsDzadzW+M Fo0Mq1qBzS0+VpvfgPSlj0mhk7J9/mtR0yNWiWF71yylYT6gVy/n8pXSNyq2NtbNaiXS qIkL5TS1YBy7UfKtqi5rxy2NAnBaWaxOGjnB48EyBXxgkyMWWb0TbBd7bB9UfpW2M9sz aTZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KRbveXH9nYptpFO3zn7yIEQdAEH/boC3EqerFhZxVaI=; b=Z5e14lCQPZzX95cpoFDxHRvL8zNyu6lWTfRw8JXZYjz0JOir0//rO/6H9YAFx2knZK bGU/F/xj+sZz0htu+KADXCmk+mYIX+asoagPIu+pPmk6me1DlFRWVfefLyNxTq+2vJcH Wfn6xEe+I+sEAPK5xAWuYoUjXXRjQLnJ2U/Y9rA7ThVw+LkzTOfWqMkcejkIE6P75T6Y SGrjg95/OKLXijU7jA/HdbtEeWpMEzdP1ZW0J/QFZvyPaOoLxgI5c6830boftdwTPcZZ Cs4GUrwjUNQb5FI4X3piDQQxPrAdCt3y2mMjPs1kPfQ8gutdA2Qv27g9D3rabtmd2XWq RkfQ== X-Gm-Message-State: AGi0PubpZ4S1FrmS0zbdjZI+ur/EWduwomOKp9sqhzAw/Wa17+mXDfE6 76Zx3JJbElAd8FHlta6TKJaToT6RKR4= X-Google-Smtp-Source: APiQypJYULtB0InFCdnzvPa+iYEFgvNxJCBdw/9GgbagH67BRqHHAWqPVvmAjpUVimInakdZIeOgIw== X-Received: by 2002:a17:90a:cb8c:: with SMTP id a12mr798081pju.153.1588133189929; Tue, 28 Apr 2020 21:06:29 -0700 (PDT) Received: from localhost.localdomain (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id i25sm16103370pfo.196.2020.04.28.21.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 21:06:29 -0700 (PDT) From: Rosen Penev To: linux-media@vger.kernel.org Subject: [PATCH 1/7] utils: replace strchr with std variant Date: Tue, 28 Apr 2020 21:06:21 -0700 Message-Id: <20200429040627.27859-1-rosenp@gmail.com> X-Mailer: git-send-email 2.25.3 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Rosen Penev --- utils/cec-compliance/cec-test.cpp | 5 +++-- utils/cec-ctl/cec-ctl.cpp | 13 +++++++------ utils/cec-follower/cec-follower.cpp | 5 +++-- utils/libcecutil/cec-parse.cpp | 4 ++-- utils/v4l2-compliance/v4l2-compliance.cpp | 5 +++-- utils/v4l2-ctl/v4l2-ctl-common.cpp | 8 ++++---- utils/v4l2-ctl/v4l2-ctl-edid.cpp | 5 +++-- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 7 ++++--- utils/v4l2-ctl/v4l2-ctl-vbi.cpp | 5 +++-- utils/v4l2-dbg/v4l2-dbg.cpp | 4 ++-- 10 files changed, 34 insertions(+), 27 deletions(-) diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp index 50d434b9..a84f83d3 100644 --- a/utils/cec-compliance/cec-test.cpp +++ b/utils/cec-compliance/cec-test.cpp @@ -3,10 +3,11 @@ * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. */ +#include + #include #include #include -#include #include #include #include @@ -1530,7 +1531,7 @@ void listTests() int setExpectedResult(char *optarg, bool no_warnings) { - char *equal = strchr(optarg, '='); + char *equal = std::strchr(optarg, '='); if (!equal || equal == optarg || !isdigit(equal[1])) return 1; diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp index b8edb105..7db7ca38 100644 --- a/utils/cec-ctl/cec-ctl.cpp +++ b/utils/cec-ctl/cec-ctl.cpp @@ -3,10 +3,11 @@ * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. */ +#include + #include #include #include -#include #include #include #include @@ -1917,7 +1918,7 @@ int main(int argc, char **argv) case OptIgnore: { bool all_la = !strncmp(optarg, "all", 3); bool all_opcodes = true; - const char *sep = strchr(optarg, ','); + const char *sep = std::strchr(optarg, ','); unsigned la_mask = 0xffff, opcode, la = 0; if (sep) @@ -2068,7 +2069,7 @@ int main(int argc, char **argv) size--; break; } - value = strchr(value, ':'); + value = std::strchr(value, ':'); if (value == NULL) break; value++; @@ -2109,7 +2110,7 @@ int main(int argc, char **argv) size--; break; } - value = strchr(value, ':'); + value = std::strchr(value, ':'); if (value == NULL) break; value++; @@ -2150,7 +2151,7 @@ int main(int argc, char **argv) size--; break; } - value = strchr(value, ':'); + value = std::strchr(value, ':'); if (value == NULL) break; value++; @@ -2184,7 +2185,7 @@ int main(int argc, char **argv) size--; break; } - value = strchr(value, ':'); + value = std::strchr(value, ':'); if (value == NULL) break; value++; diff --git a/utils/cec-follower/cec-follower.cpp b/utils/cec-follower/cec-follower.cpp index 7c8c044e..589426ec 100644 --- a/utils/cec-follower/cec-follower.cpp +++ b/utils/cec-follower/cec-follower.cpp @@ -3,10 +3,11 @@ * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. */ +#include + #include #include #include -#include #include #include #include @@ -386,7 +387,7 @@ int main(int argc, char **argv) case OptIgnore: { bool all_la = !strncmp(optarg, "all", 3); bool all_opcodes = true; - const char *sep = strchr(optarg, ','); + const char *sep = std::strchr(optarg, ','); unsigned la_mask = 0xffff, opcode, la = 0; if (sep) diff --git a/utils/libcecutil/cec-parse.cpp b/utils/libcecutil/cec-parse.cpp index 5fffcce7..8c869fec 100644 --- a/utils/libcecutil/cec-parse.cpp +++ b/utils/libcecutil/cec-parse.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -18,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -191,7 +191,7 @@ unsigned cec_parse_phys_addr(const char *value) { unsigned p1, p2, p3, p4; - if (!strchr(value, '.')) + if (!std::strchr(value, '.')) return strtoul(value, NULL, 0); if (sscanf(value, "%x.%x.%x.%x", &p1, &p2, &p3, &p4) != 4) { fprintf(stderr, "Expected a physical address of the form x.x.x.x\n"); diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index da8a7d10..5b715fa5 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -18,10 +18,11 @@ Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ +#include + #include #include #include -#include #include #include #include @@ -1580,7 +1581,7 @@ int main(int argc, char **argv) break; case OptStreamFrom: case OptStreamFromHdr: { - char *equal = strchr(optarg, '='); + char *equal = std::strchr(optarg, '='); bool has_hdr = ch == OptStreamFromHdr; if (equal == optarg) diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp index bbd00e95..764d984a 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include @@ -22,6 +21,7 @@ #include #endif +#include #include #include #include @@ -741,7 +741,7 @@ static bool parse_subset(char *optarg) memset(&subset, 0, sizeof(subset)); while (*optarg) { - p = strchr(optarg, ','); + p = std::strchr(optarg, ','); if (p) *p = 0; if (optarg[0] == 0) { @@ -808,7 +808,7 @@ void common_cmd(const std::string &media_bus_info, int ch, char *optarg) common_usage(); std::exit(EXIT_FAILURE); } - if (strchr(value, '=')) { + if (std::strchr(value, '=')) { common_usage(); std::exit(EXIT_FAILURE); } @@ -824,7 +824,7 @@ void common_cmd(const std::string &media_bus_info, int ch, char *optarg) common_usage(); std::exit(EXIT_FAILURE); } - if (const char *equal = strchr(value, '=')) { + if (const char *equal = std::strchr(value, '=')) { set_ctrls[std::string(value, (equal - value))] = equal + 1; } else { diff --git a/utils/v4l2-ctl/v4l2-ctl-edid.cpp b/utils/v4l2-ctl/v4l2-ctl-edid.cpp index a2df6089..b13d8209 100644 --- a/utils/v4l2-ctl/v4l2-ctl-edid.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-edid.cpp @@ -1,7 +1,8 @@ +#include + #include #include #include -#include #include #include #include @@ -710,7 +711,7 @@ static unsigned short parse_phys_addr(const char *value) { unsigned p1, p2, p3, p4; - if (!strchr(value, '.')) + if (!std::strchr(value, '.')) return strtoul(value, NULL, 0); if (sscanf(value, "%x.%x.%x.%x", &p1, &p2, &p3, &p4) != 4) { fprintf(stderr, "Expected a physical address of the form x.x.x.x\n"); diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp index 95ffe986..59783ff3 100644 --- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp @@ -1,7 +1,8 @@ +#include + #include #include #include -#include #include #include #include @@ -1660,7 +1661,7 @@ static FILE *open_output_file(cv4l_fd &fd) if (!host_to) return NULL; - char *p = strchr(host_to, ':'); + char *p = std::strchr(host_to, ':'); struct sockaddr_in serv_addr; struct hostent *server; struct v4l2_fract aspect; @@ -1925,7 +1926,7 @@ static FILE *open_input_file(cv4l_fd &fd, __u32 type) if (!host_from) return NULL; - char *p = strchr(host_from, ':'); + char *p = std::strchr(host_from, ':'); int listen_fd; socklen_t clilen; struct sockaddr_in serv_addr = {}, cli_addr; diff --git a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp index 6a4f627f..ee55012f 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp @@ -1,7 +1,8 @@ +#include + #include #include #include -#include #include #include #include @@ -98,7 +99,7 @@ void vbi_cmd(int ch, char *optarg) std::exit(EXIT_FAILURE); } while (*optarg) { - subs = strchr(optarg, ','); + subs = std::strchr(optarg, ','); if (subs) *subs = 0; diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp index f2fd8269..86266376 100644 --- a/utils/v4l2-dbg/v4l2-dbg.cpp +++ b/utils/v4l2-dbg/v4l2-dbg.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -43,6 +42,7 @@ #include +#include #include #include #include @@ -731,7 +731,7 @@ int main(int argc, char **argv) goto list_done; } - p = strchr(chip_info.name, ' '); + p = std::strchr(chip_info.name, ' '); if (p) *p = '\0'; name = chip_info.name; From patchwork Wed Apr 29 04:06:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 11516003 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F057112C for ; Wed, 29 Apr 2020 04:06:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6730120731 for ; Wed, 29 Apr 2020 04:06:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JIt/DX0c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726045AbgD2EGd (ORCPT ); Wed, 29 Apr 2020 00:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725497AbgD2EGc (ORCPT ); Wed, 29 Apr 2020 00:06:32 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC86C03C1AD for ; Tue, 28 Apr 2020 21:06:31 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id fu13so238302pjb.5 for ; Tue, 28 Apr 2020 21:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Tix+JDc416wZdNYQbAN7QNgNaU823auhpAJWZ/nMdxI=; b=JIt/DX0coHfK2T9gZ6vaK13jCgJqpPhQ3i/xGd3nFlDF1tJdCQaBVXO2+Fogn3I0RF PFQSH+mVdwAP49pSuMRzC+rOTC24BXa2pSfWmk7B5yNB6o3mSG5j4BW+154qpJh/jLpt IQbFUvP77jI0MPLCuGQL46muS9AEfDkgLJTsabc1D2ni4E2FYaKI6SLnQwIZJaF8nSsz 0dx/k2szMEC6o45UP7AzeV5g4Y3N49HAJLTbJgLgQOIk5WMowvEOifUctUBXooYgAgpn m7f4qtC9ZEITbgmSq5SUW5exY6/43ifGeP81rcRqGBKLPrfpiuTNfsmeydj1zz+fCQ2t RolQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tix+JDc416wZdNYQbAN7QNgNaU823auhpAJWZ/nMdxI=; b=dfNwAum/xrisFSHDX+ghUtom76qQ4HGuLkQXX0ED5kZSjdHcv2xIEgNKQlxpUnaLdK nhS8z5iuywJSXW7vYy2HLCBcdiWO7WCbPh79B8i9pdDtnNAAG59IS59Mp6a9SbCOZHQh 39SPiDbNaU781F+WFGiGfcWnq7rTNWv9tCpxlx5jTYjh604wUHmAL0KiJnGqag0qibhs 6bpOfPXzcHxyGi8BrM77OjYnSZMGksjFNWn2RdFNrXs/mLqNLebDUIbdoIBSq1hipLBP KW6p4Qq3ZAh0/VXAwenF1RREWFVfL+E1BFyYXcTctQnJ6GJ/U6wHlKJ9nr6MlzwZu7M7 YCaQ== X-Gm-Message-State: AGi0PuY9D90wdxBQIEWmfiUETHK5gQZIdr2ZYoZxaNWASxy7IxJ+t0HO wAW3eZSBhwrvArd4iCdXD9HJClaw0VI= X-Google-Smtp-Source: APiQypLRe8tF0TkDIF9cUvmUX88MXSCUpf9u70h7GE84Kg97XxF9dE6NDEA9l3Eo3DtHvoYgOHd37Q== X-Received: by 2002:a17:90a:fd94:: with SMTP id cx20mr782679pjb.157.1588133190690; Tue, 28 Apr 2020 21:06:30 -0700 (PDT) Received: from localhost.localdomain (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id i25sm16103370pfo.196.2020.04.28.21.06.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 21:06:30 -0700 (PDT) From: Rosen Penev To: linux-media@vger.kernel.org Subject: [PATCH 2/7] utils: replace strrchr with std variant Date: Tue, 28 Apr 2020 21:06:22 -0700 Message-Id: <20200429040627.27859-2-rosenp@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200429040627.27859-1-rosenp@gmail.com> References: <20200429040627.27859-1-rosenp@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Rosen Penev --- utils/cec-ctl/cec-ctl.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-common.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp index 7db7ca38..899b83b1 100644 --- a/utils/cec-ctl/cec-ctl.cpp +++ b/utils/cec-ctl/cec-ctl.cpp @@ -1651,7 +1651,7 @@ static void stress_test_power_cycle(struct node &node, unsigned cnt, static int calc_node_val(const char *s) { - s = strrchr(s, '/') + 1; + s = std::strrchr(s, '/') + 1; if (!memcmp(s, "cec", 3)) return atol(s + 3); diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp index 764d984a..47f5da1a 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp @@ -152,7 +152,7 @@ static int calc_node_val(const char *s) { int n = 0; - s = strrchr(s, '/') + 1; + s = std::strrchr(s, '/') + 1; for (unsigned i = 0; prefixes[i]; i++) { unsigned l = strlen(prefixes[i]); From patchwork Wed Apr 29 04:06:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 11516005 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 74F4B112C for ; Wed, 29 Apr 2020 04:06:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54A9120731 for ; Wed, 29 Apr 2020 04:06:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Xs/OXuL7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726548AbgD2EGe (ORCPT ); Wed, 29 Apr 2020 00:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725497AbgD2EGe (ORCPT ); Wed, 29 Apr 2020 00:06:34 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8501C03C1AC for ; Tue, 28 Apr 2020 21:06:32 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id f8so368663plt.2 for ; Tue, 28 Apr 2020 21:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=sXOiGl4Q6PEpSoPUX4WqQfgJF+uMe3eyWU1D2owBpLQ=; b=Xs/OXuL7ay66py4qX0/++HrnbvIKOW/cT5lNh08do/3zsKCmOHpLk4N3XJb6Z3V1V9 fOqa/cv9AjXVVbKjnAoYp2qEkai/3IhnvR40AdFCsLIKaIl+2v9GH522Fz1rhPYF8jTu S4/wZtYE/kZ20oM/8EiwTigCClPKwJ1shrS72j6vBCRziypTSdHPjsrmPGDppsTApH4A I94m2XobwChxaJZa5FZJ2ZoBY9aSM7ocOZN9hxafI6V8+8/EGJ82IRBjOfSwgh+hHjAu yZ5B38K3CNVLcGwKPKQcSDc7zCBDzaH2br4hRaoZVuf7n/LG233zOJjKrmt1d+iO28E3 Z9yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sXOiGl4Q6PEpSoPUX4WqQfgJF+uMe3eyWU1D2owBpLQ=; b=B0/Ix71aDVTHeNKIPxmlHCH5dr7KYydNL0S+0yD/2CnO6YCexj62+vS87fOFqp6MS2 /Mx+qg4PF3t2OV0YwLdZjHk2UYXPWpJ6gRzd6VbEndsKg999VTho3F3tnNV3po53u0aP EGnvYYJf+1+WAWH6AqtfzELunIT247jNCNN4zzMdLNncvvLBKPAaNl1lb43dUyzsCeo0 fTQ/URvHz3/9yzQKFghHtxUIIsNmuX5TctLAaXhNtQ7C3LL0MUNzDgqezSKTlQ0Ch0h2 O7blr52L6O8z8vyCSLOFNfnyEulY0spClWhWCaos96MVfjmz+O+nFxfcCs1zxB4WFC/g WhUw== X-Gm-Message-State: AGi0Pubp7zlzS54pLRDC47fUVVb9a77xh2dS5oOQRLmX2p8hV6zyPzB4 tzJOUrKBUk+lcnnOVqDP6zOuH37LPdI= X-Google-Smtp-Source: APiQypJlGqk3E8dZRf2faxCJ8B6J+HWlxm5U/WOMyEFJrhnc7AmC1jbv5vdbhkxl3lplgf0CA2dOpg== X-Received: by 2002:a17:90a:fd89:: with SMTP id cx9mr828631pjb.64.1588133191527; Tue, 28 Apr 2020 21:06:31 -0700 (PDT) Received: from localhost.localdomain (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id i25sm16103370pfo.196.2020.04.28.21.06.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 21:06:31 -0700 (PDT) From: Rosen Penev To: linux-media@vger.kernel.org Subject: [PATCH 3/7] utils: convert all is* functions to std Date: Tue, 28 Apr 2020 21:06:23 -0700 Message-Id: <20200429040627.27859-3-rosenp@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200429040627.27859-1-rosenp@gmail.com> References: <20200429040627.27859-1-rosenp@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Rosen Penev --- utils/cec-compliance/cec-compliance.cpp | 6 +++--- utils/cec-compliance/cec-compliance.h | 2 +- utils/cec-compliance/cec-test.cpp | 2 +- utils/cec-ctl/cec-ctl.cpp | 4 ++-- utils/cec-follower/cec-follower.cpp | 2 +- utils/common/media-info.cpp | 4 ++-- utils/libcecutil/cec-info.cpp | 2 +- utils/libcecutil/cec-parse.cpp | 2 +- utils/rds-ctl/rds-ctl.cpp | 2 +- utils/v4l2-compliance/v4l2-compliance.cpp | 4 ++-- utils/v4l2-ctl/v4l2-ctl-common.cpp | 6 +++--- utils/v4l2-ctl/v4l2-ctl-edid.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-stds.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-vidcap.cpp | 4 ++-- utils/v4l2-ctl/v4l2-ctl.cpp | 8 ++++---- utils/v4l2-dbg/v4l2-dbg.cpp | 4 ++-- 16 files changed, 33 insertions(+), 33 deletions(-) diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp index d0580579..5f0a74ec 100644 --- a/utils/cec-compliance/cec-compliance.cpp +++ b/utils/cec-compliance/cec-compliance.cpp @@ -244,10 +244,10 @@ std::string safename(const char *name) bool not_alnum = false; while (*name) { - if (isalnum(*name)) { + if (std::isalnum(*name)) { if (not_alnum && !s.empty()) s += '-'; - s += tolower(*name); + s += std::tolower(*name); not_alnum = false; } else if (!not_alnum) not_alnum = true; @@ -1158,7 +1158,7 @@ int main(int argc, char **argv) collectTests(); for (i = 0; long_options[i].name; i++) { - if (!isalpha(long_options[i].val)) + if (!std::isalpha(long_options[i].val)) continue; short_options[idx++] = long_options[i].val; if (long_options[i].has_arg == required_argument) { diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h index 36b83d26..b435782f 100644 --- a/utils/cec-compliance/cec-compliance.h +++ b/utils/cec-compliance/cec-compliance.h @@ -293,7 +293,7 @@ static inline char get_yn() { char c; - while ((c = tolower(getchar())) != 'y' && c != 'n'); + while ((c = std::tolower(getchar())) != 'y' && c != 'n'); getchar(); return c; } diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp index a84f83d3..67d4c397 100644 --- a/utils/cec-compliance/cec-test.cpp +++ b/utils/cec-compliance/cec-test.cpp @@ -1533,7 +1533,7 @@ int setExpectedResult(char *optarg, bool no_warnings) { char *equal = std::strchr(optarg, '='); - if (!equal || equal == optarg || !isdigit(equal[1])) + if (!equal || equal == optarg || !std::isdigit(equal[1])) return 1; *equal = 0; std::string name = safename(optarg); diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp index 899b83b1..8c4b2ffa 100644 --- a/utils/cec-ctl/cec-ctl.cpp +++ b/utils/cec-ctl/cec-ctl.cpp @@ -1756,7 +1756,7 @@ static void list_devices() return; } while ((ep = readdir(dp))) - if (!memcmp(ep->d_name, "cec", 3) && isdigit(ep->d_name[3])) + if (!memcmp(ep->d_name, "cec", 3) && std::isdigit(ep->d_name[3])) files.push_back(std::string("/dev/") + ep->d_name); closedir(dp); @@ -1859,7 +1859,7 @@ int main(int argc, char **argv) memset(phys_addrs, 0xff, sizeof(phys_addrs)); for (i = 0; long_options[i].name; i++) { - if (!isalpha(long_options[i].val)) + if (!std::isalpha(long_options[i].val)) continue; short_options[idx++] = long_options[i].val; if (long_options[i].has_arg == required_argument) diff --git a/utils/cec-follower/cec-follower.cpp b/utils/cec-follower/cec-follower.cpp index 589426ec..4922d1ab 100644 --- a/utils/cec-follower/cec-follower.cpp +++ b/utils/cec-follower/cec-follower.cpp @@ -324,7 +324,7 @@ int main(int argc, char **argv) int i; for (i = 0; long_options[i].name; i++) { - if (!isalpha(long_options[i].val)) + if (!std::isalpha(long_options[i].val)) continue; short_options[idx++] = long_options[i].val; if (long_options[i].has_arg == required_argument) { diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp index 8aa12f34..89dfe2d7 100644 --- a/utils/common/media-info.cpp +++ b/utils/common/media-info.cpp @@ -88,7 +88,7 @@ media_type mi_media_detect_type(const char *device) const char *devname = media_types[i].devname; size_t len = strlen(devname); - if (!line.compare(0, len, devname) && isdigit(line[0+len])) { + if (!line.compare(0, len, devname) && std::isdigit(line[0+len])) { uevent_file.close(); return media_types[i].type; } @@ -220,7 +220,7 @@ int mi_get_media_fd(int fd, const char *bus_info) return -1; media_path[0] = 0; while ((ep = readdir(dp))) { - if (!memcmp(ep->d_name, "media", 5) && isdigit(ep->d_name[5])) { + if (!memcmp(ep->d_name, "media", 5) && std::isdigit(ep->d_name[5])) { struct media_device_info mdinfo; std::string devname("/dev/"); diff --git a/utils/libcecutil/cec-info.cpp b/utils/libcecutil/cec-info.cpp index f6e60918..6741e358 100644 --- a/utils/libcecutil/cec-info.cpp +++ b/utils/libcecutil/cec-info.cpp @@ -498,7 +498,7 @@ std::string cec_device_find(const char *driver, const char *adapter) return name; } while ((ep = readdir(dp))) - if (!memcmp(ep->d_name, "cec", 3) && isdigit(ep->d_name[3])) { + if (!memcmp(ep->d_name, "cec", 3) && std::isdigit(ep->d_name[3])) { std::string devname("/dev/"); struct cec_caps caps; int fd; diff --git a/utils/libcecutil/cec-parse.cpp b/utils/libcecutil/cec-parse.cpp index 8c869fec..4621b7f6 100644 --- a/utils/libcecutil/cec-parse.cpp +++ b/utils/libcecutil/cec-parse.cpp @@ -178,7 +178,7 @@ int cec_parse_subopt(char **subs, const char * const *subopts, char **value) static unsigned parse_enum(const char *value, const struct cec_arg *a) { - if (isdigit(*value)) + if (std::isdigit(*value)) return strtoul(value, NULL, 0); for (int i = 0; i < a->num_enum_values; i++) { if (!strcmp(value, a->values[i].type_name)) diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp index 73fc7e3c..1da70fa0 100644 --- a/utils/rds-ctl/rds-ctl.cpp +++ b/utils/rds-ctl/rds-ctl.cpp @@ -751,7 +751,7 @@ static int parse_cl(int argc, char **argv) std::exit(EXIT_FAILURE); } for (i = 0; long_options[i].name; i++) { - if (!isalpha(long_options[i].val)) + if (!std::isalpha(long_options[i].val)) continue; short_options[idx++] = long_options[i].val; if (long_options[i].has_arg == required_argument) diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index 5b715fa5..13f14346 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -835,7 +835,7 @@ static int open_media_bus_info(const std::string &bus_info, std::string &media_d while ((ep = readdir(dp))) { const char *name = ep->d_name; - if (!memcmp(name, "media", 5) && isdigit(name[5])) { + if (!memcmp(name, "media", 5) && std::isdigit(name[5])) { struct media_device_info mdi; media_devname = std::string("/dev/") + name; @@ -1510,7 +1510,7 @@ int main(int argc, char **argv) } for (i = 0; long_options[i].name; i++) { - if (!isalpha(long_options[i].val)) + if (!std::isalpha(long_options[i].val)) continue; short_options[idx++] = long_options[i].val; if (long_options[i].has_arg == required_argument) { diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp index 47f5da1a..44d0c060 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp @@ -141,7 +141,7 @@ static bool is_v4l_dev(const char *name) unsigned l = strlen(prefixes[i]); if (!memcmp(name, prefixes[i], l)) { - if (isdigit(name[l])) + if (std::isdigit(name[l])) return true; } } @@ -339,11 +339,11 @@ static std::string name2var(const char *name) int add_underscore = 0; while (*name) { - if (isalnum(*name)) { + if (std::isalnum(*name)) { if (add_underscore) s += '_'; add_underscore = 0; - s += std::string(1, tolower(*name)); + s += std::string(1, std::tolower(*name)); } else if (s.length()) add_underscore = 1; name++; diff --git a/utils/v4l2-ctl/v4l2-ctl-edid.cpp b/utils/v4l2-ctl/v4l2-ctl-edid.cpp index b13d8209..932d561f 100644 --- a/utils/v4l2-ctl/v4l2-ctl-edid.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-edid.cpp @@ -260,7 +260,7 @@ static void read_edid_file(FILE *f, struct v4l2_edid *e) /* Handle '0x' prefix */ if ((i & 1) && value[0] == '0' && (c == 'x' || c == 'X')) i--; - if (!isxdigit(c)) + if (!std::isxdigit(c)) continue; if (i & 0x01) { value[1] = c; diff --git a/utils/v4l2-ctl/v4l2-ctl-stds.cpp b/utils/v4l2-ctl/v4l2-ctl-stds.cpp index 8dd06c43..f36f8fbd 100644 --- a/utils/v4l2-ctl/v4l2-ctl-stds.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-stds.cpp @@ -79,7 +79,7 @@ void stds_usage() static v4l2_std_id parse_pal(const char *pal) { if (pal[0] == '-') { - switch (tolower(pal[1])) { + switch (std::tolower(pal[1])) { case '6': return V4L2_STD_PAL_60; case 'b': @@ -88,7 +88,7 @@ static v4l2_std_id parse_pal(const char *pal) case 'h': return V4L2_STD_PAL_H; case 'n': - if (tolower(pal[2]) == 'c') + if (std::tolower(pal[2]) == 'c') return V4L2_STD_PAL_Nc; return V4L2_STD_PAL_N; case 'i': @@ -108,7 +108,7 @@ static v4l2_std_id parse_pal(const char *pal) static v4l2_std_id parse_secam(const char *secam) { if (secam[0] == '-') { - switch (tolower(secam[1])) { + switch (std::tolower(secam[1])) { case 'b': case 'g': case 'h': @@ -117,7 +117,7 @@ static v4l2_std_id parse_secam(const char *secam) case 'k': return V4L2_STD_SECAM_DK; case 'l': - if (tolower(secam[2]) == 'c') + if (std::tolower(secam[2]) == 'c') return V4L2_STD_SECAM_LC; return V4L2_STD_SECAM_L; } @@ -130,7 +130,7 @@ static v4l2_std_id parse_secam(const char *secam) static v4l2_std_id parse_ntsc(const char *ntsc) { if (ntsc[0] == '-') { - switch (tolower(ntsc[1])) { + switch (std::tolower(ntsc[1])) { case 'm': return V4L2_STD_NTSC_M; case 'j': @@ -459,7 +459,7 @@ void stds_cmd(int ch, char *optarg) else standard = V4L2_STD_SECAM; } - else if (isdigit(optarg[0])) { + else if (std::isdigit(optarg[0])) { standard = strtol(optarg, 0L, 0) | (1ULL << 63); } else { fprintf(stderr, "Unknown standard '%s'\n", optarg); diff --git a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp index 6e920c1d..730cbf38 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp @@ -123,7 +123,7 @@ void vidcap_cmd(int ch, char *optarg) optarg[2], optarg[3]); if (be_pixfmt) frmsize.pixel_format |= 1U << 31; - } else if (isdigit(optarg[0])) { + } else if (std::isdigit(optarg[0])) { frmsize.pixel_format = strtol(optarg, 0L, 0); } else { fprintf(stderr, "The pixelformat '%s' is invalid\n", optarg); @@ -155,7 +155,7 @@ void vidcap_cmd(int ch, char *optarg) value[2], value[3]); if (be_pixfmt) frmival.pixel_format |= 1U << 31; - } else if (isdigit(optarg[0])) { + } else if (std::isdigit(optarg[0])) { frmival.pixel_format = strtol(value, 0L, 0); } else { fprintf(stderr, "The pixelformat '%s' is invalid\n", optarg); diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index f8187fea..0f6aacb0 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -791,7 +791,7 @@ int parse_fmt(char *optarg, __u32 &width, __u32 &height, __u32 &pixelformat, value[2], value[3]); if (be_pixfmt) pixelformat |= 1U << 31; - } else if (isdigit(value[0])) { + } else if (std::isdigit(value[0])) { pixelformat = strtol(value, 0L, 0); } else { fprintf(stderr, "The pixelformat '%s' is invalid\n", value); @@ -926,7 +926,7 @@ static __u32 parse_event(const char *e, const char **name) __u32 event = 0; *name = "0"; - if (isdigit(e[0])) { + if (std::isdigit(e[0])) { event = strtoul(e, 0L, 0); if (event == V4L2_EVENT_CTRL) { fprintf(stderr, "Missing control name for ctrl event, use ctrl=\n"); @@ -1008,7 +1008,7 @@ static int open_media_bus_info(const std::string &bus_info) while ((ep = readdir(dp))) { const char *name = ep->d_name; - if (!memcmp(name, "media", 5) && isdigit(name[5])) { + if (!memcmp(name, "media", 5) && std::isdigit(name[5])) { struct media_device_info mdi; std::string devname = std::string("/dev/") + name; @@ -1135,7 +1135,7 @@ int main(int argc, char **argv) return 0; } for (i = 0; long_options[i].name; i++) { - if (!isalpha(long_options[i].val)) + if (!std::isalpha(long_options[i].val)) continue; short_options[idx++] = long_options[i].val; if (long_options[i].has_arg == required_argument) { diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp index 86266376..7b53f1ee 100644 --- a/utils/v4l2-dbg/v4l2-dbg.cpp +++ b/utils/v4l2-dbg/v4l2-dbg.cpp @@ -431,7 +431,7 @@ int main(int argc, char **argv) std::exit(EXIT_SUCCESS); } for (i = 0; long_options[i].name; i++) { - if (!isalpha(long_options[i].val)) + if (!std::isalpha(long_options[i].val)) continue; short_options[idx++] = long_options[i].val; if (long_options[i].has_arg == required_argument) { @@ -479,7 +479,7 @@ int main(int argc, char **argv) break; case OptChip: - if (!memcmp(optarg, "subdev", 6) && isdigit(optarg[6])) { + if (!memcmp(optarg, "subdev", 6) && std::isdigit(optarg[6])) { match.type = V4L2_CHIP_MATCH_SUBDEV; match.addr = strtoul(optarg + 6, NULL, 0); break; From patchwork Wed Apr 29 04:06:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 11516007 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B963913 for ; Wed, 29 Apr 2020 04:06:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3D6E20757 for ; Wed, 29 Apr 2020 04:06:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RuEo0eLs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726679AbgD2EGf (ORCPT ); Wed, 29 Apr 2020 00:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725497AbgD2EGf (ORCPT ); Wed, 29 Apr 2020 00:06:35 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4CAEC03C1AD for ; Tue, 28 Apr 2020 21:06:34 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id fu13so238384pjb.5 for ; Tue, 28 Apr 2020 21:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=We0irLTTZgwTk3bgh3C7i3lmUqK5JQg3qJmYwmRHXJY=; b=RuEo0eLs6rrjbMtPKfFJ5C+1SVA5TT85NsuOCVtMZiAIfNBVKszXvzc5RlI0r+DCsC Q7FlgV9ShS5MLohoA14X8azFNrLl1tjgvMcdNLCSWBqFUeosRQDnTmXEwcyg2mHjz4CY +SRmO9nsXRYIvS5j/z6w6d5qQk6HcPFAjL42IuXdkraHv+BDWVQeW6r256fNzql22DW7 GCWSplgHv0niKI6R7DASaZV2VWTxxnEDjqW6PxVAkr6vVbkAA0j/caU/ANeXgK8VvhOU hV0NE9zPZMT6iSbo1nahvLRE0HsK01aauW0ge8qUuM4yHLnuT5CSntGDsQQJfxMotLkI 1CSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=We0irLTTZgwTk3bgh3C7i3lmUqK5JQg3qJmYwmRHXJY=; b=Nu2/2LBkJmUeNH2akf6iiAcJQOGfAAmpNGpP4Ix8oIQmeJ0BfIeKdfQLM7L5XnFCVM a6moDgzJFt79OJlNC5169LgiplClIKWOYQey7lWA1f2Tw72+A+HgwdFG6ayvIhqIQ+DT HOujjMuvCQ9JAYliC9Wx8XDZBEHgMD9ZxL8Odv7zUloxaUMbHepGtaZEZTFz6CRP3ZXC A3MkoTZ4IQu1cayUyU7w1AoGJn7gKIUPt6kait2ih4OwyJ11wPU/drnaMsuyMDcp4Tor UbgHgoEUlDpCAoDgqVNpVFMXh66M8N5eLkH1envFKwwtUEVnevdnLG+76V22UY4eSgUf iUSA== X-Gm-Message-State: AGi0PubX9UJ54QY8CTZMcBmZX/tqTAPw7E+OIsP5gP/EGwO5rXZ6O34/ cSNROo6H8N7l/0ip1J7mKIb0PhrfHxQ= X-Google-Smtp-Source: APiQypI0tmRrfYsQf7KSIAf3UEgti+pnwlyTLS6QqoVNDolalR+vFxKOy8x1jTTdnJAJqoxFPSqy1w== X-Received: by 2002:a17:90a:3251:: with SMTP id k75mr852725pjb.161.1588133193161; Tue, 28 Apr 2020 21:06:33 -0700 (PDT) Received: from localhost.localdomain (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id i25sm16103370pfo.196.2020.04.28.21.06.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 21:06:32 -0700 (PDT) From: Rosen Penev To: linux-media@vger.kernel.org Subject: [PATCH 4/7] utils: convert all string to number functions to std Date: Tue, 28 Apr 2020 21:06:24 -0700 Message-Id: <20200429040627.27859-4-rosenp@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200429040627.27859-1-rosenp@gmail.com> References: <20200429040627.27859-1-rosenp@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Rosen Penev --- utils/cec-compliance/cec-compliance.cpp | 6 +-- utils/cec-compliance/cec-test.cpp | 2 +- utils/cec-ctl/cec-ctl.cpp | 48 +++++++++++------------ utils/cec-follower/cec-follower.cpp | 4 +- utils/libcecutil/cec-parse.cpp | 6 +-- utils/rds-ctl/rds-ctl.cpp | 12 +++--- utils/v4l2-compliance/v4l2-compliance.cpp | 10 ++--- utils/v4l2-ctl/v4l2-ctl-common.cpp | 16 ++++---- utils/v4l2-ctl/v4l2-ctl-edid.cpp | 22 +++++------ utils/v4l2-ctl/v4l2-ctl-io.cpp | 8 ++-- utils/v4l2-ctl/v4l2-ctl-meta.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-misc.cpp | 8 ++-- utils/v4l2-ctl/v4l2-ctl-overlay.cpp | 32 +++++++-------- utils/v4l2-ctl/v4l2-ctl-sdr.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-selection.cpp | 16 ++++---- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 22 +++++------ utils/v4l2-ctl/v4l2-ctl-subdev.cpp | 42 ++++++++++---------- utils/v4l2-ctl/v4l2-ctl-tuner.cpp | 16 ++++---- utils/v4l2-ctl/v4l2-ctl-vbi.cpp | 14 +++---- utils/v4l2-ctl/v4l2-ctl-vidcap.cpp | 8 ++-- utils/v4l2-ctl/v4l2-ctl.cpp | 22 +++++------ utils/v4l2-dbg/v4l2-dbg.cpp | 4 +- 22 files changed, 161 insertions(+), 161 deletions(-) diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp index 5f0a74ec..ced256f2 100644 --- a/utils/cec-compliance/cec-compliance.cpp +++ b/utils/cec-compliance/cec-compliance.cpp @@ -1210,10 +1210,10 @@ int main(int argc, char **argv) adapter = optarg; break; case OptReplyThreshold: - reply_threshold = strtoul(optarg, NULL, 0); + reply_threshold = std::strtoul(optarg, NULL, 0); break; case OptTimeout: - long_timeout = strtoul(optarg, NULL, 0); + long_timeout = std::strtoul(optarg, NULL, 0); break; case OptColor: if (!strcmp(optarg, "always")) @@ -1246,7 +1246,7 @@ int main(int argc, char **argv) break; case OptRemote: if (optarg) { - remote_la = strtoul(optarg, NULL, 0); + remote_la = std::strtoul(optarg, NULL, 0); if (remote_la < 0 || remote_la > 15) { fprintf(stderr, "--test: invalid remote logical address\n"); usage(); diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp index 67d4c397..75e56fde 100644 --- a/utils/cec-compliance/cec-test.cpp +++ b/utils/cec-compliance/cec-test.cpp @@ -1539,7 +1539,7 @@ int setExpectedResult(char *optarg, bool no_warnings) std::string name = safename(optarg); if (mapTests.find(name) == mapTests.end()) return 1; - mapTests[name] = strtoul(equal + 1, NULL, 0); + mapTests[name] = std::strtoul(equal + 1, NULL, 0); mapTestsNoWarnings[name] = no_warnings; return 0; } diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp index 8c4b2ffa..c7fd7cd8 100644 --- a/utils/cec-ctl/cec-ctl.cpp +++ b/utils/cec-ctl/cec-ctl.cpp @@ -1654,7 +1654,7 @@ static int calc_node_val(const char *s) s = std::strrchr(s, '/') + 1; if (!memcmp(s, "cec", 3)) - return atol(s + 3); + return std::atoi(s + 3); return 0; } @@ -1902,18 +1902,18 @@ int main(int argc, char **argv) verbose = true; break; case OptFrom: - from = strtoul(optarg, NULL, 0) & 0xf; + from = std::strtoul(optarg, NULL, 0) & 0xf; break; case OptTo: - to = strtoul(optarg, NULL, 0) & 0xf; + to = std::strtoul(optarg, NULL, 0) & 0xf; if (first_to == 0xff) first_to = to; break; case OptTimeout: - timeout = strtoul(optarg, NULL, 0); + timeout = std::strtoul(optarg, NULL, 0); break; case OptMonitorTime: - monitor_time = strtoul(optarg, NULL, 0); + monitor_time = std::strtoul(optarg, NULL, 0); break; case OptIgnore: { bool all_la = !strncmp(optarg, "all", 3); @@ -1924,7 +1924,7 @@ int main(int argc, char **argv) if (sep) all_opcodes = !strncmp(sep + 1, "all", 3); if (!all_la) { - la = strtoul(optarg, NULL, 0); + la = std::strtoul(optarg, NULL, 0); if (la > 15) { fprintf(stderr, "invalid logical address (> 15)\n"); @@ -1937,7 +1937,7 @@ int main(int argc, char **argv) if (!strncmp(sep + 1, "poll", 4)) { opcode = POLL_FAKE_OPCODE; } else { - opcode = strtoul(sep + 1, NULL, 0); + opcode = std::strtoul(sep + 1, NULL, 0); if (opcode > 255) { fprintf(stderr, "invalid opcode (> 255)\n"); usage(); @@ -1977,7 +1977,7 @@ int main(int argc, char **argv) osd_name = optarg; break; case OptVendorID: - vendor_id = strtoul(optarg, NULL, 0) & 0x00ffffff; + vendor_id = std::strtoul(optarg, NULL, 0) & 0x00ffffff; break; case OptRcTVProfile1: rc_tv = CEC_OP_FEAT_RC_TV_PROFILE_1; @@ -2064,7 +2064,7 @@ int main(int argc, char **argv) switch (cec_parse_subopt(&subs, arg_names, &value)) { case 0: while (size < sizeof(bytes)) { - bytes[size++] = strtol(value, &endptr, 0L); + bytes[size++] = std::strtol(value, &endptr, 0L); if (endptr == value) { size--; break; @@ -2100,12 +2100,12 @@ int main(int argc, char **argv) while (*subs != '\0') { switch (cec_parse_subopt(&subs, arg_names, &value)) { case 0: - cmd = strtol(value, &endptr, 0L); + cmd = std::strtol(value, &endptr, 0L); have_cmd = true; break; case 1: while (size < sizeof(bytes)) { - bytes[size++] = strtol(value, &endptr, 0L); + bytes[size++] = std::strtol(value, &endptr, 0L); if (endptr == value) { size--; break; @@ -2142,11 +2142,11 @@ int main(int argc, char **argv) while (*subs != '\0') { switch (cec_parse_subopt(&subs, arg_names, &value)) { case 0: - vendor_id = strtol(value, 0L, 0); + vendor_id = std::strtol(value, 0L, 0); break; case 1: while (size < sizeof(bytes)) { - bytes[size++] = strtol(value, &endptr, 0L); + bytes[size++] = std::strtol(value, &endptr, 0L); if (endptr == value) { size--; break; @@ -2180,7 +2180,7 @@ int main(int argc, char **argv) switch (cec_parse_subopt(&subs, arg_names, &value)) { case 0: while (size < sizeof(bytes)) { - bytes[size++] = strtol(value, &endptr, 0L); + bytes[size++] = std::strtol(value, &endptr, 0L); if (endptr == value) { size--; break; @@ -2224,10 +2224,10 @@ int main(int argc, char **argv) while (*subs != '\0') { switch (cec_parse_subopt(&subs, arg_names, &value)) { case 0: - test_pwr_cycle_polls = strtoul(value, 0L, 0); + test_pwr_cycle_polls = std::strtoul(value, 0L, 0); break; case 1: - test_pwr_cycle_sleep = strtoul(value, 0L, 0); + test_pwr_cycle_sleep = std::strtoul(value, 0L, 0); break; default: std::exit(EXIT_FAILURE); @@ -2253,29 +2253,29 @@ int main(int argc, char **argv) while (*subs != '\0') { switch (cec_parse_subopt(&subs, arg_names, &value)) { case 0: - stress_test_pwr_cycle_cnt = strtoul(value, 0L, 0); + stress_test_pwr_cycle_cnt = std::strtoul(value, 0L, 0); break; case 1: - stress_test_pwr_cycle_min_sleep = strtoul(value, 0L, 0); + stress_test_pwr_cycle_min_sleep = std::strtoul(value, 0L, 0); break; case 2: - stress_test_pwr_cycle_max_sleep = strtoul(value, 0L, 0); + stress_test_pwr_cycle_max_sleep = std::strtoul(value, 0L, 0); break; case 3: stress_test_pwr_cycle_has_seed = true; - stress_test_pwr_cycle_seed = strtoul(value, 0L, 0); + stress_test_pwr_cycle_seed = std::strtoul(value, 0L, 0); break; case 4: - stress_test_pwr_cycle_repeats = strtoul(value, 0L, 0); + stress_test_pwr_cycle_repeats = std::strtoul(value, 0L, 0); break; case 5: - stress_test_pwr_cycle_sleep_before_on = strtod(value, NULL); + stress_test_pwr_cycle_sleep_before_on = std::strtod(value, NULL); break; case 6: - stress_test_pwr_cycle_sleep_before_off = strtod(value, NULL); + stress_test_pwr_cycle_sleep_before_off = std::strtod(value, NULL); break; case 7: - stress_test_pwr_cycle_polls = strtoul(value, 0L, 0); + stress_test_pwr_cycle_polls = std::strtoul(value, 0L, 0); break; default: std::exit(EXIT_FAILURE); diff --git a/utils/cec-follower/cec-follower.cpp b/utils/cec-follower/cec-follower.cpp index 4922d1ab..3314a0a1 100644 --- a/utils/cec-follower/cec-follower.cpp +++ b/utils/cec-follower/cec-follower.cpp @@ -393,7 +393,7 @@ int main(int argc, char **argv) if (sep) all_opcodes = !strncmp(sep + 1, "all", 3); if (!all_la) { - la = strtoul(optarg, NULL, 0); + la = std::strtoul(optarg, NULL, 0); if (la > 15) { fprintf(stderr, "invalid logical address (> 15)\n"); @@ -403,7 +403,7 @@ int main(int argc, char **argv) la_mask = 1 << la; } if (!all_opcodes) { - opcode = strtoul(sep + 1, NULL, 0); + opcode = std::strtoul(sep + 1, NULL, 0); if (opcode > 255) { fprintf(stderr, "invalid opcode (> 255)\n"); usage(); diff --git a/utils/libcecutil/cec-parse.cpp b/utils/libcecutil/cec-parse.cpp index 4621b7f6..54c000bb 100644 --- a/utils/libcecutil/cec-parse.cpp +++ b/utils/libcecutil/cec-parse.cpp @@ -179,7 +179,7 @@ int cec_parse_subopt(char **subs, const char * const *subopts, char **value) static unsigned parse_enum(const char *value, const struct cec_arg *a) { if (std::isdigit(*value)) - return strtoul(value, NULL, 0); + return std::strtoul(value, NULL, 0); for (int i = 0; i < a->num_enum_values; i++) { if (!strcmp(value, a->values[i].type_name)) return a->values[i].value; @@ -192,7 +192,7 @@ unsigned cec_parse_phys_addr(const char *value) unsigned p1, p2, p3, p4; if (!std::strchr(value, '.')) - return strtoul(value, NULL, 0); + return std::strtoul(value, NULL, 0); if (sscanf(value, "%x.%x.%x.%x", &p1, &p2, &p3, &p4) != 4) { fprintf(stderr, "Expected a physical address of the form x.x.x.x\n"); return 0; @@ -207,7 +207,7 @@ unsigned cec_parse_phys_addr(const char *value) static unsigned parse_latency(const char *value) { char *end; - unsigned delay = strtoul(value, &end, 0); + unsigned delay = std::strtoul(value, &end, 0); if (!memcmp(end, "ms", 2)) delay = (delay / 2) + 1; diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp index 1da70fa0..00908533 100644 --- a/utils/rds-ctl/rds-ctl.cpp +++ b/utils/rds-ctl/rds-ctl.cpp @@ -404,13 +404,13 @@ static void parse_freq_seek(char *optarg, struct v4l2_hw_freq_seek &seek) switch (parse_subopt(&subs, subopts, &value)) { case 0: - seek.seek_upward = strtol(value, 0L, 0); + seek.seek_upward = std::strtol(value, 0L, 0); break; case 1: - seek.wrap_around = strtol(value, 0L, 0); + seek.wrap_around = std::strtol(value, 0L, 0); break; case 2: - seek.spacing = strtol(value, 0L, 0); + seek.spacing = std::strtol(value, 0L, 0); break; default: usage_tuner(); @@ -776,7 +776,7 @@ static int parse_cl(int argc, char **argv) params.fd_name[sizeof(params.fd_name) - 1] = '\0'; break; case OptSetFreq: - params.freq = strtod(optarg, NULL); + params.freq = std::strtod(optarg, NULL); break; case OptListDevices: print_devices(list_devices()); @@ -785,7 +785,7 @@ static int parse_cl(int argc, char **argv) parse_freq_seek(optarg, params.freq_seek); break; case OptTunerIndex: - params.tuner_index = strtoul(optarg, NULL, 0); + params.tuner_index = std::strtoul(optarg, NULL, 0); break; case OptOpenFile: { @@ -802,7 +802,7 @@ static int parse_cl(int argc, char **argv) break; } case OptWaitLimit: - params.wait_limit = strtoul(optarg, NULL, 0); + params.wait_limit = std::strtoul(optarg, NULL, 0); break; case ':': fprintf(stderr, "Option '%s' requires a value\n", diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index 13f14346..6c92b901 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -897,7 +897,7 @@ static std::string make_devname(const char *device, const char *devname, goto err; if (device[0] == '0' && device[1] == 'x') - iface_id = strtoul(device, NULL, 16); + iface_id = std::strtoul(device, NULL, 16); if (!iface_id) { for (i = 0; i < topology.num_entities; i++) @@ -1577,7 +1577,7 @@ int main(int argc, char **argv) break; case OptStreaming: if (optarg) - frame_count = strtoul(optarg, NULL, 0); + frame_count = std::strtoul(optarg, NULL, 0); break; case OptStreamFrom: case OptStreamFromHdr: { @@ -1598,7 +1598,7 @@ int main(int argc, char **argv) } case OptStreamAllFormats: if (optarg) - all_fmt_frame_count = strtoul(optarg, NULL, 0); + all_fmt_frame_count = std::strtoul(optarg, NULL, 0); break; case OptStreamAllColorTest: subs = optarg; @@ -1624,10 +1624,10 @@ int main(int argc, char **argv) } break; case 1: - color_skip = strtoul(value, 0L, 0); + color_skip = std::strtoul(value, 0L, 0); break; case 2: - color_perc = strtoul(value, 0L, 0); + color_perc = std::strtoul(value, 0L, 0); if (color_perc == 0) color_perc = 90; if (color_perc > 100) diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp index 44d0c060..632ada9e 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp @@ -159,7 +159,7 @@ static int calc_node_val(const char *s) if (!memcmp(s, prefixes[i], l)) { n = i << 8; - n += atol(s + l); + n += std::atol(s + l); return n; } } @@ -756,9 +756,9 @@ static bool parse_subset(char *optarg) return true; } if (idx & 1) - subset.offset[idx / 2] = strtoul(optarg, 0, 0); + subset.offset[idx / 2] = std::strtoul(optarg, 0, 0); else { - subset.size[idx / 2 - 1] = strtoul(optarg, 0, 0); + subset.size[idx / 2 - 1] = std::strtoul(optarg, 0, 0); if (subset.size[idx / 2 - 1] == 0) { fprintf(stderr, " cannot be 0\n"); return true; @@ -840,7 +840,7 @@ void common_cmd(const std::string &media_bus_info, int ch, char *optarg) } break; case OptSetPriority: - prio = static_cast(strtoul(optarg, 0L, 0)); + prio = static_cast(std::strtoul(optarg, 0L, 0)); break; case OptListDevices: if (media_bus_info.empty()) @@ -952,19 +952,19 @@ void common_set(cv4l_fd &_fd) switch (qc.type) { case V4L2_CTRL_TYPE_U8: - v = strtoul(iter->second.c_str(), NULL, 0); + v = std::strtoul(iter->second.c_str(), NULL, 0); for (i = 0; i < qc.elems; i++) if (idx_in_subset(qc, subset, divide, i)) ctrl.p_u8[i] = v; break; case V4L2_CTRL_TYPE_U16: - v = strtoul(iter->second.c_str(), NULL, 0); + v = std::strtoul(iter->second.c_str(), NULL, 0); for (i = 0; i < qc.elems; i++) if (idx_in_subset(qc, subset, divide, i)) ctrl.p_u16[i] = v; break; case V4L2_CTRL_TYPE_U32: - v = strtoul(iter->second.c_str(), NULL, 0); + v = std::strtoul(iter->second.c_str(), NULL, 0); for (i = 0; i < qc.elems; i++) if (idx_in_subset(qc, subset, divide, i)) ctrl.p_u32[i] = v; @@ -985,7 +985,7 @@ void common_set(cv4l_fd &_fd) } else { if (V4L2_CTRL_DRIVER_PRIV(ctrl.id)) use_ext_ctrls = true; - ctrl.value = strtol(iter->second.c_str(), NULL, 0); + ctrl.value = std::strtol(iter->second.c_str(), NULL, 0); } class2ctrls[V4L2_CTRL_ID2WHICH(ctrl.id)].push_back(ctrl); } diff --git a/utils/v4l2-ctl/v4l2-ctl-edid.cpp b/utils/v4l2-ctl/v4l2-ctl-edid.cpp index 932d561f..3c09de7a 100644 --- a/utils/v4l2-ctl/v4l2-ctl-edid.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-edid.cpp @@ -266,7 +266,7 @@ static void read_edid_file(FILE *f, struct v4l2_edid *e) value[1] = c; if (i % 256 == 1) edid_add_block(e); - e->edid[i / 2] = strtoul(value, 0, 16); + e->edid[i / 2] = std::strtoul(value, 0, 16); } else { value[0] = c; } @@ -712,7 +712,7 @@ static unsigned short parse_phys_addr(const char *value) unsigned p1, p2, p3, p4; if (!std::strchr(value, '.')) - return strtoul(value, NULL, 0); + return std::strtoul(value, NULL, 0); if (sscanf(value, "%x.%x.%x.%x", &p1, &p2, &p3, &p4) != 4) { fprintf(stderr, "Expected a physical address of the form x.x.x.x\n"); return 0xffff; @@ -997,7 +997,7 @@ void edid_cmd(int ch, char *optarg) } switch (opt) { case 0: - sedid.pad = strtoul(value, 0, 0); + sedid.pad = std::strtoul(value, 0, 0); break; case 1: case 2: /* keep edid for compat reasons, it's the same as type */ @@ -1052,13 +1052,13 @@ void edid_cmd(int ch, char *optarg) phys_addr = parse_phys_addr(value); break; case 6: - mod_s_pt = strtoul(value, 0, 0) & 3; + mod_s_pt = std::strtoul(value, 0, 0) & 3; break; case 7: - mod_s_it = strtoul(value, 0, 0) & 3; + mod_s_it = std::strtoul(value, 0, 0) & 3; break; case 8: - mod_s_ce = strtoul(value, 0, 0) & 3; + mod_s_ce = std::strtoul(value, 0, 0) & 3; break; case 9: toggle_hdmi_vsdb_dc_flags |= HDMI_VSDB_Y444_BIT; break; case 10: toggle_hdmi_vsdb_dc_flags |= HDMI_VSDB_30_BIT; break; @@ -1117,7 +1117,7 @@ void edid_cmd(int ch, char *optarg) case OptClearEdid: if (optarg) - clear_pad = strtoul(optarg, 0, 0); + clear_pad = std::strtoul(optarg, 0, 0); break; case OptGetEdid: @@ -1140,17 +1140,17 @@ void edid_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - gedid.pad = strtoul(value, 0, 0); + gedid.pad = std::strtoul(value, 0, 0); break; case 1: - gedid.start_block = strtoul(value, 0, 0); + gedid.start_block = std::strtoul(value, 0, 0); if (gedid.start_block > 255) { fprintf(stderr, "startblock %d too large, max 255\n", gedid.start_block); std::exit(EXIT_FAILURE); } break; case 2: - gedid.blocks = strtoul(value, 0, 0); + gedid.blocks = std::strtoul(value, 0, 0); break; case 3: if (!strcmp(value, "hex")) { @@ -1180,7 +1180,7 @@ void edid_cmd(int ch, char *optarg) case OptInfoEdid: memset(&info_edid, 0, sizeof(info_edid)); if (optarg) - info_edid.pad = strtoul(optarg, 0, 0); + info_edid.pad = std::strtoul(optarg, 0, 0); break; } } diff --git a/utils/v4l2-ctl/v4l2-ctl-io.cpp b/utils/v4l2-ctl/v4l2-ctl-io.cpp index 9e83c03a..8b6650a4 100644 --- a/utils/v4l2-ctl/v4l2-ctl-io.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-io.cpp @@ -79,16 +79,16 @@ void io_cmd(int ch, char *optarg) { switch (ch) { case OptSetInput: - input = strtol(optarg, 0L, 0); + input = std::strtol(optarg, 0L, 0); break; case OptSetOutput: - output = strtol(optarg, 0L, 0); + output = std::strtol(optarg, 0L, 0); break; case OptSetAudioInput: - vaudio.index = strtol(optarg, 0L, 0); + vaudio.index = std::strtol(optarg, 0L, 0); break; case OptSetAudioOutput: - vaudout.index = strtol(optarg, 0L, 0); + vaudout.index = std::strtol(optarg, 0L, 0); break; } } diff --git a/utils/v4l2-ctl/v4l2-ctl-meta.cpp b/utils/v4l2-ctl/v4l2-ctl-meta.cpp index 2561b029..baf405e8 100644 --- a/utils/v4l2-ctl/v4l2-ctl-meta.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-meta.cpp @@ -54,7 +54,7 @@ void meta_cmd(int ch, char *optarg) vfmt.fmt.meta.dataformat = v4l2_fourcc(optarg[0], optarg[1], optarg[2], optarg[3]); } else { - vfmt.fmt.meta.dataformat = strtol(optarg, 0L, 0); + vfmt.fmt.meta.dataformat = std::strtol(optarg, 0L, 0); } break; } diff --git a/utils/v4l2-ctl/v4l2-ctl-misc.cpp b/utils/v4l2-ctl/v4l2-ctl-misc.cpp index 6db87568..365a03ef 100644 --- a/utils/v4l2-ctl/v4l2-ctl-misc.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-misc.cpp @@ -186,10 +186,10 @@ void misc_cmd(int ch, char *optarg) switch (ch) { case OptSetParm: - fps = strtod(optarg, NULL); + fps = std::strtod(optarg, NULL); break; case OptSetOutputParm: - output_fps = strtod(optarg, NULL); + output_fps = std::strtod(optarg, NULL); break; case OptSetJpegComp: subs = optarg; @@ -209,7 +209,7 @@ void misc_cmd(int ch, char *optarg) switch (opt) { case 16: - jpegcomp.quality = strtol(value, 0L, 0); + jpegcomp.quality = std::strtol(value, 0L, 0); break; case 17: if (strstr(value, "dht")) @@ -294,7 +294,7 @@ void misc_cmd(int ch, char *optarg) dec_cmd.stop.pts = strtoull(value, 0, 0); break; case 3: - dec_cmd.start.speed = strtol(value, 0, 0); + dec_cmd.start.speed = std::strtol(value, 0, 0); break; case 4: if (!strcmp(value, "gop")) diff --git a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp index 16344a15..0c67a916 100644 --- a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp @@ -239,27 +239,27 @@ void overlay_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - overlay_fmt.fmt.win.chromakey = strtoul(value, 0L, 0); + overlay_fmt.fmt.win.chromakey = std::strtoul(value, 0L, 0); set_overlay_fmt |= FmtChromaKey; break; case 1: - overlay_fmt.fmt.win.global_alpha = strtoul(value, 0L, 0); + overlay_fmt.fmt.win.global_alpha = std::strtoul(value, 0L, 0); set_overlay_fmt |= FmtGlobalAlpha; break; case 2: - overlay_fmt.fmt.win.w.left = strtol(value, 0L, 0); + overlay_fmt.fmt.win.w.left = std::strtol(value, 0L, 0); set_overlay_fmt |= FmtLeft; break; case 3: - overlay_fmt.fmt.win.w.top = strtol(value, 0L, 0); + overlay_fmt.fmt.win.w.top = std::strtol(value, 0L, 0); set_overlay_fmt |= FmtTop; break; case 4: - overlay_fmt.fmt.win.w.width = strtoul(value, 0L, 0); + overlay_fmt.fmt.win.w.width = std::strtoul(value, 0L, 0); set_overlay_fmt |= FmtWidth; break; case 5: - overlay_fmt.fmt.win.w.height = strtoul(value, 0L, 0); + overlay_fmt.fmt.win.w.height = std::strtoul(value, 0L, 0); set_overlay_fmt |= FmtHeight; break; case 6: @@ -287,16 +287,16 @@ void overlay_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - r.left = strtoul(value, 0L, 0); + r.left = std::strtoul(value, 0L, 0); break; case 1: - r.top = strtoul(value, 0L, 0); + r.top = std::strtoul(value, 0L, 0); break; case 2: - r.width = strtoul(value, 0L, 0); + r.width = std::strtoul(value, 0L, 0); break; case 3: - r.height = strtoul(value, 0L, 0); + r.height = std::strtoul(value, 0L, 0); break; default: overlay_usage(); @@ -338,27 +338,27 @@ void overlay_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: fbuf.flags &= ~chroma_flags; - fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_CHROMAKEY : 0; + fbuf.flags |= std::strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_CHROMAKEY : 0; set_fbuf |= chroma_flags; break; case 1: fbuf.flags &= ~chroma_flags; - fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_SRC_CHROMAKEY : 0; + fbuf.flags |= std::strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_SRC_CHROMAKEY : 0; set_fbuf |= chroma_flags; break; case 2: fbuf.flags &= ~alpha_flags; - fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_GLOBAL_ALPHA : 0; + fbuf.flags |= std::strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_GLOBAL_ALPHA : 0; set_fbuf |= alpha_flags; break; case 3: fbuf.flags &= ~alpha_flags; - fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_LOCAL_ALPHA : 0; + fbuf.flags |= std::strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_LOCAL_ALPHA : 0; set_fbuf |= alpha_flags; break; case 4: fbuf.flags &= ~alpha_flags; - fbuf.flags |= strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_LOCAL_INV_ALPHA : 0; + fbuf.flags |= std::strtol(value, 0L, 0) ? V4L2_FBUF_FLAG_LOCAL_INV_ALPHA : 0; set_fbuf |= alpha_flags; break; case 5: @@ -377,7 +377,7 @@ void overlay_cmd(int ch, char *optarg) } break; case OptOverlay: - overlay = strtol(optarg, 0L, 0); + overlay = std::strtol(optarg, 0L, 0); break; } } diff --git a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp index 62b26f0c..5101f66c 100644 --- a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp @@ -57,7 +57,7 @@ void sdr_cmd(int ch, char *optarg) vfmt.fmt.sdr.pixelformat = v4l2_fourcc(optarg[0], optarg[1], optarg[2], optarg[3]); } else { - vfmt.fmt.sdr.pixelformat = strtol(optarg, 0L, 0); + vfmt.fmt.sdr.pixelformat = std::strtol(optarg, 0L, 0); } break; } diff --git a/utils/v4l2-ctl/v4l2-ctl-selection.cpp b/utils/v4l2-ctl/v4l2-ctl-selection.cpp index be62eb03..017ac0bf 100644 --- a/utils/v4l2-ctl/v4l2-ctl-selection.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-selection.cpp @@ -119,19 +119,19 @@ static void parse_crop(char *optarg, unsigned int &set_crop, v4l2_rect &vcrop) switch (parse_subopt(&subs, subopts, &value)) { case 0: - vcrop.left = strtol(value, 0L, 0); + vcrop.left = std::strtol(value, 0L, 0); set_crop |= CropLeft; break; case 1: - vcrop.top = strtol(value, 0L, 0); + vcrop.top = std::strtol(value, 0L, 0); set_crop |= CropTop; break; case 2: - vcrop.width = strtol(value, 0L, 0); + vcrop.width = std::strtol(value, 0L, 0); set_crop |= CropWidth; break; case 3: - vcrop.height = strtol(value, 0L, 0); + vcrop.height = std::strtol(value, 0L, 0); set_crop |= CropHeight; break; default: @@ -192,19 +192,19 @@ static int parse_selection(char *optarg, unsigned int &set_sel, v4l2_selection & set_sel |= SelectionFlags; break; case 2: - vsel.r.left = strtol(value, 0L, 0); + vsel.r.left = std::strtol(value, 0L, 0); set_sel |= SelectionLeft; break; case 3: - vsel.r.top = strtol(value, 0L, 0); + vsel.r.top = std::strtol(value, 0L, 0); set_sel |= SelectionTop; break; case 4: - vsel.r.width = strtoul(value, 0L, 0); + vsel.r.width = std::strtoul(value, 0L, 0); set_sel |= SelectionWidth; break; case 5: - vsel.r.height = strtoul(value, 0L, 0); + vsel.r.height = std::strtoul(value, 0L, 0); set_sel |= SelectionHeight; break; default: diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp index 59783ff3..0a2b2205 100644 --- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp @@ -652,13 +652,13 @@ void streaming_cmd(int ch, char *optarg) switch (ch) { case OptStreamCount: - stream_count = strtoul(optarg, 0L, 0); + stream_count = std::strtoul(optarg, 0L, 0); break; case OptStreamSkip: - stream_skip = strtoul(optarg, 0L, 0); + stream_skip = std::strtoul(optarg, 0L, 0); break; case OptStreamSleep: - stream_sleep = strtol(optarg, 0L, 0); + stream_sleep = std::strtol(optarg, 0L, 0); break; case OptStreamNoQuery: stream_no_query = true; @@ -667,7 +667,7 @@ void streaming_cmd(int ch, char *optarg) stream_loop = true; break; case OptStreamOutPattern: - stream_pat = strtoul(optarg, 0L, 0); + stream_pat = std::strtoul(optarg, 0L, 0); for (i = 0; tpg_pattern_strings[i]; i++) ; if (stream_pat >= i) stream_pat = 0; @@ -707,7 +707,7 @@ void streaming_cmd(int ch, char *optarg) streaming_usage(); break; case OptStreamOutAlphaComponent: - stream_out_alpha = strtoul(optarg, 0L, 0); + stream_out_alpha = std::strtoul(optarg, 0L, 0); break; case OptStreamOutAlphaRedOnly: stream_out_alpha_red_only = true; @@ -717,7 +717,7 @@ void streaming_cmd(int ch, char *optarg) break; case OptStreamOutHorSpeed: case OptStreamOutVertSpeed: - speed = strtol(optarg, 0L, 0); + speed = std::strtol(optarg, 0L, 0); if (speed < -3) speed = -3; if (speed > 3) @@ -728,7 +728,7 @@ void streaming_cmd(int ch, char *optarg) stream_out_vert_mode = static_cast(speed + 3); break; case OptStreamOutPercFill: - stream_out_perc_fill = strtoul(optarg, 0L, 0); + stream_out_perc_fill = std::strtoul(optarg, 0L, 0); if (stream_out_perc_fill > 100) stream_out_perc_fill = 100; if (stream_out_perc_fill < 1) @@ -768,7 +768,7 @@ void streaming_cmd(int ch, char *optarg) fallthrough; case OptStreamMmap: if (optarg) { - reqbufs_count_cap = strtoul(optarg, 0L, 0); + reqbufs_count_cap = std::strtoul(optarg, 0L, 0); if (reqbufs_count_cap == 0) reqbufs_count_cap = 3; } @@ -781,7 +781,7 @@ void streaming_cmd(int ch, char *optarg) fallthrough; case OptStreamOutMmap: if (optarg) { - reqbufs_count_out = strtoul(optarg, 0L, 0); + reqbufs_count_out = std::strtoul(optarg, 0L, 0); if (reqbufs_count_out == 0) reqbufs_count_out = 3; } @@ -1672,7 +1672,7 @@ static FILE *open_output_file(cv4l_fd &fd) aspect = fd.g_pixel_aspect(width, height); if (p) { - host_port_to = strtoul(p + 1, 0L, 0); + host_port_to = std::strtoul(p + 1, 0L, 0); *p = '\0'; } host_fd_to = socket(AF_INET, SOCK_STREAM, 0); @@ -1932,7 +1932,7 @@ static FILE *open_input_file(cv4l_fd &fd, __u32 type) struct sockaddr_in serv_addr = {}, cli_addr; if (p) { - host_port_from = strtoul(p + 1, 0L, 0); + host_port_from = std::strtoul(p + 1, 0L, 0); *p = '\0'; } listen_fd = socket(AF_INET, SOCK_STREAM, 0); diff --git a/utils/v4l2-ctl/v4l2-ctl-subdev.cpp b/utils/v4l2-ctl/v4l2-ctl-subdev.cpp index 9e17a58d..d1699635 100644 --- a/utils/v4l2-ctl/v4l2-ctl-subdev.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-subdev.cpp @@ -108,7 +108,7 @@ void subdev_cmd(int ch, char *optarg) switch (ch) { case OptListSubDevMBusCodes: if (optarg) - list_mbus_codes_pad = strtoul(optarg, 0L, 0); + list_mbus_codes_pad = std::strtoul(optarg, 0L, 0); break; case OptListSubDevFrameSizes: subs = optarg; @@ -121,10 +121,10 @@ void subdev_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - frmsize.pad = strtoul(value, 0L, 0); + frmsize.pad = std::strtoul(value, 0L, 0); break; case 1: - frmsize.code = strtoul(value, 0L, 0); + frmsize.code = std::strtoul(value, 0L, 0); break; default: subdev_usage(); @@ -145,16 +145,16 @@ void subdev_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - frmival.pad = strtoul(value, 0L, 0); + frmival.pad = std::strtoul(value, 0L, 0); break; case 1: - frmival.code = strtoul(value, 0L, 0); + frmival.code = std::strtoul(value, 0L, 0); break; case 2: - frmival.width = strtoul(value, 0L, 0); + frmival.width = std::strtoul(value, 0L, 0); break; case 3: - frmival.height = strtoul(value, 0L, 0); + frmival.height = std::strtoul(value, 0L, 0); break; default: subdev_usage(); @@ -164,7 +164,7 @@ void subdev_cmd(int ch, char *optarg) break; case OptGetSubDevFormat: if (optarg) - get_fmt_pad = strtoul(optarg, 0L, 0); + get_fmt_pad = std::strtoul(optarg, 0L, 0); break; case OptGetSubDevSelection: subs = optarg; @@ -178,7 +178,7 @@ void subdev_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - get_sel_pad = strtoul(value, 0L, 0); + get_sel_pad = std::strtoul(value, 0L, 0); break; case 1: if (parse_selection_target(value, target)) { @@ -196,7 +196,7 @@ void subdev_cmd(int ch, char *optarg) break; case OptGetSubDevFPS: if (optarg) - get_fps_pad = strtoul(optarg, 0L, 0); + get_fps_pad = std::strtoul(optarg, 0L, 0); break; case OptSetSubDevFormat: case OptTrySubDevFormat: @@ -219,15 +219,15 @@ void subdev_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - ffmt.width = strtoul(value, 0L, 0); + ffmt.width = std::strtoul(value, 0L, 0); set_fmt |= FmtWidth; break; case 1: - ffmt.height = strtoul(value, 0L, 0); + ffmt.height = std::strtoul(value, 0L, 0); set_fmt |= FmtHeight; break; case 2: - ffmt.code = strtoul(value, 0L, 0); + ffmt.code = std::strtoul(value, 0L, 0); set_fmt |= FmtPixelFormat; break; case 3: @@ -258,7 +258,7 @@ void subdev_cmd(int ch, char *optarg) set_fmt |= FmtXferFunc; break; case 9: - set_fmt_pad = strtoul(value, 0L, 0); + set_fmt_pad = std::strtoul(value, 0L, 0); break; default: fprintf(stderr, "Unknown option\n"); @@ -296,23 +296,23 @@ void subdev_cmd(int ch, char *optarg) set_selection |= SelectionFlags; break; case 2: - vsel.r.left = strtol(value, 0L, 0); + vsel.r.left = std::strtol(value, 0L, 0); set_selection |= SelectionLeft; break; case 3: - vsel.r.top = strtol(value, 0L, 0); + vsel.r.top = std::strtol(value, 0L, 0); set_selection |= SelectionTop; break; case 4: - vsel.r.width = strtoul(value, 0L, 0); + vsel.r.width = std::strtoul(value, 0L, 0); set_selection |= SelectionWidth; break; case 5: - vsel.r.height = strtoul(value, 0L, 0); + vsel.r.height = std::strtoul(value, 0L, 0); set_selection |= SelectionHeight; break; case 6: - vsel.pad = strtoul(value, 0L, 0); + vsel.pad = std::strtoul(value, 0L, 0); break; default: fprintf(stderr, "Unknown option\n"); @@ -333,10 +333,10 @@ void subdev_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - set_fps_pad = strtoul(value, 0L, 0); + set_fps_pad = std::strtoul(value, 0L, 0); break; case 1: - set_fps = strtod(value, NULL); + set_fps = std::strtod(value, NULL); break; default: fprintf(stderr, "Unknown option\n"); diff --git a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp index 981b8765..cf2fd8af 100644 --- a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp @@ -182,19 +182,19 @@ static void parse_freq_seek(char *optarg, struct v4l2_hw_freq_seek &seek) switch (parse_subopt(&subs, subopts, &value)) { case 0: - seek.seek_upward = strtol(value, 0L, 0); + seek.seek_upward = std::strtol(value, 0L, 0); break; case 1: - seek.wrap_around = strtol(value, 0L, 0); + seek.wrap_around = std::strtol(value, 0L, 0); break; case 2: - seek.spacing = strtol(value, 0L, 0); + seek.spacing = std::strtol(value, 0L, 0); break; case 3: - low = strtod(value, NULL); + low = std::strtod(value, NULL); break; case 4: - high = strtod(value, NULL); + high = std::strtod(value, NULL); break; default: tuner_usage(); @@ -207,7 +207,7 @@ void tuner_cmd(int ch, char *optarg) { switch (ch) { case OptSetFreq: - freq = strtod(optarg, NULL); + freq = std::strtod(optarg, NULL); break; case OptSetTuner: if (!strcmp(optarg, "stereo")) @@ -227,7 +227,7 @@ void tuner_cmd(int ch, char *optarg) } break; case OptSetModulator: - txsubchans = strtol(optarg, 0L, 0); + txsubchans = std::strtol(optarg, 0L, 0); if (!strcmp(optarg, "stereo")) txsubchans = V4L2_TUNER_SUB_STEREO; else if (!strcmp(optarg, "stereo-sap")) @@ -252,7 +252,7 @@ void tuner_cmd(int ch, char *optarg) parse_freq_seek(optarg, freq_seek); break; case OptTunerIndex: - tuner_index = strtoul(optarg, NULL, 0); + tuner_index = std::strtoul(optarg, NULL, 0); break; } } diff --git a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp index ee55012f..e6795ac2 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp @@ -151,25 +151,25 @@ void vbi_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - raw->fmt.vbi.sampling_rate = strtoul(value, NULL, 0); + raw->fmt.vbi.sampling_rate = std::strtoul(value, NULL, 0); break; case 1: - raw->fmt.vbi.offset = strtoul(value, NULL, 0); + raw->fmt.vbi.offset = std::strtoul(value, NULL, 0); break; case 2: - raw->fmt.vbi.samples_per_line = strtoul(value, NULL, 0); + raw->fmt.vbi.samples_per_line = std::strtoul(value, NULL, 0); break; case 3: - raw->fmt.vbi.start[0] = strtoul(value, NULL, 0); + raw->fmt.vbi.start[0] = std::strtoul(value, NULL, 0); break; case 4: - raw->fmt.vbi.start[1] = strtoul(value, NULL, 0); + raw->fmt.vbi.start[1] = std::strtoul(value, NULL, 0); break; case 5: - raw->fmt.vbi.count[0] = strtoul(value, NULL, 0); + raw->fmt.vbi.count[0] = std::strtoul(value, NULL, 0); break; case 6: - raw->fmt.vbi.count[1] = strtoul(value, NULL, 0); + raw->fmt.vbi.count[1] = std::strtoul(value, NULL, 0); break; default: vbi_usage(); diff --git a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp index 730cbf38..a185e33b 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp @@ -124,7 +124,7 @@ void vidcap_cmd(int ch, char *optarg) if (be_pixfmt) frmsize.pixel_format |= 1U << 31; } else if (std::isdigit(optarg[0])) { - frmsize.pixel_format = strtol(optarg, 0L, 0); + frmsize.pixel_format = std::strtol(optarg, 0L, 0); } else { fprintf(stderr, "The pixelformat '%s' is invalid\n", optarg); std::exit(EXIT_FAILURE); @@ -142,10 +142,10 @@ void vidcap_cmd(int ch, char *optarg) switch (parse_subopt(&subs, subopts, &value)) { case 0: - frmival.width = strtol(value, 0L, 0); + frmival.width = std::strtol(value, 0L, 0); break; case 1: - frmival.height = strtol(value, 0L, 0); + frmival.height = std::strtol(value, 0L, 0); break; case 2: be_pixfmt = strlen(value) == 7 && !memcmp(value + 4, "-BE", 3); @@ -156,7 +156,7 @@ void vidcap_cmd(int ch, char *optarg) if (be_pixfmt) frmival.pixel_format |= 1U << 31; } else if (std::isdigit(optarg[0])) { - frmival.pixel_format = strtol(value, 0L, 0); + frmival.pixel_format = std::strtol(value, 0L, 0); } else { fprintf(stderr, "The pixelformat '%s' is invalid\n", optarg); std::exit(EXIT_FAILURE); diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index 0f6aacb0..844c1af9 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -776,11 +776,11 @@ int parse_fmt(char *optarg, __u32 &width, __u32 &height, __u32 &pixelformat, switch (parse_subopt(&subs, subopts, &value)) { case 0: - width = strtoul(value, 0L, 0); + width = std::strtoul(value, 0L, 0); fmts |= FmtWidth; break; case 1: - height = strtoul(value, 0L, 0); + height = std::strtoul(value, 0L, 0); fmts |= FmtHeight; break; case 2: @@ -792,7 +792,7 @@ int parse_fmt(char *optarg, __u32 &width, __u32 &height, __u32 &pixelformat, if (be_pixfmt) pixelformat |= 1U << 31; } else if (std::isdigit(value[0])) { - pixelformat = strtol(value, 0L, 0); + pixelformat = std::strtol(value, 0L, 0); } else { fprintf(stderr, "The pixelformat '%s' is invalid\n", value); std::exit(EXIT_FAILURE); @@ -819,7 +819,7 @@ int parse_fmt(char *optarg, __u32 &width, __u32 &height, __u32 &pixelformat, fmts |= FmtYCbCr; break; case 7: - bytesperline[bpl_index] = strtoul(value, 0L, 0); + bytesperline[bpl_index] = std::strtoul(value, 0L, 0); if (bytesperline[bpl_index] > 0xffff) { fprintf(stderr, "bytesperline can't be more than 65535\n"); bytesperline[bpl_index] = 0; @@ -840,7 +840,7 @@ int parse_fmt(char *optarg, __u32 &width, __u32 &height, __u32 &pixelformat, fmts |= FmtXferFunc; break; case 11: - sizeimage[sizeimage_index] = strtoul(value, 0L, 0); + sizeimage[sizeimage_index] = std::strtoul(value, 0L, 0); sizeimage_index++; fmts |= FmtSizeImage; break; @@ -927,7 +927,7 @@ static __u32 parse_event(const char *e, const char **name) *name = "0"; if (std::isdigit(e[0])) { - event = strtoul(e, 0L, 0); + event = std::strtoul(e, 0L, 0); if (event == V4L2_EVENT_CTRL) { fprintf(stderr, "Missing control name for ctrl event, use ctrl=\n"); misc_usage(); @@ -1062,7 +1062,7 @@ static const char *make_devname(const char *device, const char *devname, goto err; if (device[0] == '0' && device[1] == 'x') - iface_id = strtoul(device, NULL, 16); + iface_id = std::strtoul(device, NULL, 16); if (!iface_id) { for (i = 0; i < topology.num_entities; i++) @@ -1244,7 +1244,7 @@ int main(int argc, char **argv) return 1; break; case OptSleep: - secs = strtoul(optarg, 0L, 0); + secs = std::strtoul(optarg, 0L, 0); break; case ':': fprintf(stderr, "Option '%s' requires a value\n", @@ -1509,7 +1509,7 @@ int main(int argc, char **argv) if (wait_for_event == V4L2_EVENT_CTRL) sub.id = common_find_ctrl_id(wait_event_id); else if (wait_for_event == V4L2_EVENT_SOURCE_CHANGE) - sub.id = strtoul(wait_event_id, 0L, 0); + sub.id = std::strtoul(wait_event_id, 0L, 0); if (!doioctl(fd, VIDIOC_SUBSCRIBE_EVENT, &sub)) if (!doioctl(fd, VIDIOC_DQEVENT, &ev)) print_event(&ev); @@ -1525,7 +1525,7 @@ int main(int argc, char **argv) if (poll_for_event == V4L2_EVENT_CTRL) sub.id = common_find_ctrl_id(poll_event_id); else if (poll_for_event == V4L2_EVENT_SOURCE_CHANGE) - sub.id = strtoul(poll_event_id, 0L, 0); + sub.id = std::strtoul(poll_event_id, 0L, 0); if (!doioctl(fd, VIDIOC_SUBSCRIBE_EVENT, &sub)) { fd_set fds; __u32 seq = 0; @@ -1566,7 +1566,7 @@ int main(int argc, char **argv) if (epoll_for_event == V4L2_EVENT_CTRL) sub.id = common_find_ctrl_id(epoll_event_id); else if (epoll_for_event == V4L2_EVENT_SOURCE_CHANGE) - sub.id = strtoul(epoll_event_id, 0L, 0); + sub.id = std::strtoul(epoll_event_id, 0L, 0); if (!doioctl(fd, VIDIOC_SUBSCRIBE_EVENT, &sub)) { __u32 seq = 0; diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp index 7b53f1ee..04ec6475 100644 --- a/utils/v4l2-dbg/v4l2-dbg.cpp +++ b/utils/v4l2-dbg/v4l2-dbg.cpp @@ -481,12 +481,12 @@ int main(int argc, char **argv) case OptChip: if (!memcmp(optarg, "subdev", 6) && std::isdigit(optarg[6])) { match.type = V4L2_CHIP_MATCH_SUBDEV; - match.addr = strtoul(optarg + 6, NULL, 0); + match.addr = std::strtoul(optarg + 6, NULL, 0); break; } if (!memcmp(optarg, "bridge", 6)) { match.type = V4L2_CHIP_MATCH_BRIDGE; - match.addr = strtoul(optarg + 6, NULL, 0); + match.addr = std::strtoul(optarg + 6, NULL, 0); break; } match.type = V4L2_CHIP_MATCH_BRIDGE; From patchwork Wed Apr 29 04:06:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 11516009 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79158112C for ; Wed, 29 Apr 2020 04:06:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5885920731 for ; Wed, 29 Apr 2020 04:06:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ckwPvzZp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbgD2EGg (ORCPT ); Wed, 29 Apr 2020 00:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725497AbgD2EGg (ORCPT ); Wed, 29 Apr 2020 00:06:36 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6520C03C1AC for ; Tue, 28 Apr 2020 21:06:34 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id t40so241222pjb.3 for ; Tue, 28 Apr 2020 21:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9l/dtozA+v2LD09E92jyBVx1Et6tVYACc6uQt2Rjwbs=; b=ckwPvzZpypG3M6GNwn3wnH7BHBZex3S3BbGcyt3rmBZhVnGNU9oHsLaB85h1SpgKBA P+mdvn5ZvQh914F9SqfQiEFvOnTSp0BACw34N9dc0gX+Xlm1pHuoS3FRirhTXcw30RHc Yfwb+fcLpRcIIt/VOWmJ7wjnd6LW6U57RUa1dqTYt/oyW2zWwww+DDeKDlTsFOZI5TeG NLL2KllYYoIM5JI8s5cMtwdHr3J/8tGN+l1KwzBiJJDgVBYZClz3z/Z1Q2TFuBw6JdFm QkzA6rBUk2K7MRbeqgFY9Nhe7tS78L54nf7CYqxxGcKFrJ89aHfbK4lmZ4nRVYlE6pdP dExw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9l/dtozA+v2LD09E92jyBVx1Et6tVYACc6uQt2Rjwbs=; b=ntJFvDi4Fvbfl9CcD0Cge/XBLeKGJgwrDddSetggkvz1xeakdC6mtXW3fId8WHtt/x kPLZOebQ00VvbUkjvYXh/DZ3Wq43w7Q33Qp1XDJsGxdV1ICpXrYBdWKyKZAyYe5PTwv/ qsl0FmMGIg290cmiz0c3mIGzNEaEW6Gati0oSIeZeRe0cN75k7UvGWw5G4pbHz3ET5TH SaZdP5DSmTD2MW83K2xiNuQKzXXQog/rFlTt3a9wKne4Aqaq7Iz2/hVR7LHw16dikfn/ DtACV4+euA8IW/uNDyvSrw21QwxZhRVVSI7uFwPeTRPYvDANsqvf8Z91hvx6UELagaYY eAQg== X-Gm-Message-State: AGi0PubO7QKRrK0jl++k1Y2Oz+O+kwFdaQ18MnYZkjtX4I37AO1vOd9K 0mJMwUp3fPGLOP7Xruf5NCKRt1SIEzk= X-Google-Smtp-Source: APiQypIGQpR+cJOPyYv7tCRwjN25fATqTq3M3QsxWKHfEXPLufohdc5IOKhBe7GS9SKDtCQF8ghSLw== X-Received: by 2002:a17:90a:246e:: with SMTP id h101mr863586pje.83.1588133193973; Tue, 28 Apr 2020 21:06:33 -0700 (PDT) Received: from localhost.localdomain (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id i25sm16103370pfo.196.2020.04.28.21.06.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 21:06:33 -0700 (PDT) From: Rosen Penev To: linux-media@vger.kernel.org Subject: [PATCH 5/7] v4l-utils: fix compilation with libcxx Date: Tue, 28 Apr 2020 21:06:25 -0700 Message-Id: <20200429040627.27859-5-rosenp@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200429040627.27859-1-rosenp@gmail.com> References: <20200429040627.27859-1-rosenp@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The fallthrough define doesn't work properly there. Use the included macro. Signed-off-by: Rosen Penev --- include/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/compiler.h b/include/compiler.h index 22fa660b..53d9b7ec 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -1,5 +1,9 @@ #ifdef __cplusplus +#ifdef _LIBCPP_VERSION +#define fallthrough _LIBCPP_FALLTHROUGH() +#else + #ifdef __clang__ #define fallthrough [[clang::fallthrough]] #else @@ -7,3 +11,4 @@ #endif #endif +#endif From patchwork Wed Apr 29 04:06:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 11516011 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 22AD213B2 for ; Wed, 29 Apr 2020 04:06:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B8F220731 for ; Wed, 29 Apr 2020 04:06:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pTLvEqus" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726698AbgD2EGh (ORCPT ); Wed, 29 Apr 2020 00:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726682AbgD2EGg (ORCPT ); Wed, 29 Apr 2020 00:06:36 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A35AC03C1AD for ; Tue, 28 Apr 2020 21:06:36 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id a32so245760pje.5 for ; Tue, 28 Apr 2020 21:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=i9F+VILKuKQzBhdWosNT7FkUiuGdeB/n59N+2U3pLeY=; b=pTLvEqusqe5jtGTFdCAxaNnNgO5M32WuOM0qD48zw6HjVVJAIKC8YnoA+DET838MRI It+WZ9zLIhXVC5vN8Dc2Q52XqXAQUj0CnerT8CYaavm8q+jQgLbgR1Ruv67p5Z3ES8ux HKjTbQvPf0DBzMpZ8//QtjHIQfUS2cR3VNfUgzo5pAHFR15udGXDbOsjA6CIgCBBjwlZ AM7SmnnejG2wedsCfLvgXmR4ng43aI86MrTr1BNDcuKYy0pSF6+UqXIrBn3YZ9UvjO8Q NeQusOtH96Xp9kLV43FBNS7yPVC2OXogoeP4hWMyytAsrBQSqKEpRtA3HuKjjkpJ0FD8 qrpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i9F+VILKuKQzBhdWosNT7FkUiuGdeB/n59N+2U3pLeY=; b=V2D7/IvrbGy/IUexg57a9WUir4aGV6K9c28acnvULEzmVNh17oJ373MA/dvzasTzlD 2wyhjSkco202QtLlQICps+oBcHlKKOTqkaRxx32bVGxm/lAv5+/CO3ysdI8btEg3OL01 m0MdgWJ6dnvNrqy3hSFv8slsUgyOaP6Yosk5PkZ6nbpyHIyouHtyLhu7GbjidqceAdkQ Z+5rcWiBGCkb35JlLr3T01BxtwiGu4/2DHKBmpYhsU8iK1BTOa6qBwFDsr+RXlviw0pJ wiLkHvINjFgzvCsQJPPR+OgLT4VL0zxxoLQ+YxFXk86rYJmi6GNwsE2fDV+3hPs83aG1 no/A== X-Gm-Message-State: AGi0PuZF4866t7EcSPBpx4pi3qRC1Df4/iDsplFezD9AgBhpvqtagAgF EoUBJ3lJmRFthnkRzoTZhVOy+lHzfyo= X-Google-Smtp-Source: APiQypLcaUb5jYCicYsLd8hzZXVZJrMsw1fN4Dcgv5maI9A7EeHexUbgzaS8tp0XDhnGFRB6lytjhg== X-Received: by 2002:a17:90a:4e81:: with SMTP id o1mr787028pjh.161.1588133195017; Tue, 28 Apr 2020 21:06:35 -0700 (PDT) Received: from localhost.localdomain (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id i25sm16103370pfo.196.2020.04.28.21.06.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 21:06:34 -0700 (PDT) From: Rosen Penev To: linux-media@vger.kernel.org Subject: [PATCH 6/7] compiler: fix compilation with clang + std=c++98 + glibcxx Date: Tue, 28 Apr 2020 21:06:26 -0700 Message-Id: <20200429040627.27859-6-rosenp@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200429040627.27859-1-rosenp@gmail.com> References: <20200429040627.27859-1-rosenp@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org It seems clang does not like these attributes in c++98 mode. Signed-off-by: Rosen Penev --- include/compiler.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/compiler.h b/include/compiler.h index 53d9b7ec..5ad54f41 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -1,14 +1,17 @@ -#ifdef __cplusplus - #ifdef _LIBCPP_VERSION #define fallthrough _LIBCPP_FALLTHROUGH() #else +#if __cplusplus >= 201103L + #ifdef __clang__ #define fallthrough [[clang::fallthrough]] #else #define fallthrough [[gnu::fallthrough]] -#endif +#endif // __clang__ + +#else +#define fallthrough ((void)0) -#endif -#endif +#endif // __cplusplus +#endif // _LIBCPP_VERSION From patchwork Wed Apr 29 04:06:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 11516013 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 372D7913 for ; Wed, 29 Apr 2020 04:06:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 115F520757 for ; Wed, 29 Apr 2020 04:06:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="k0HpuL4k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbgD2EGi (ORCPT ); Wed, 29 Apr 2020 00:06:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726702AbgD2EGh (ORCPT ); Wed, 29 Apr 2020 00:06:37 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 483ACC03C1AC for ; Tue, 28 Apr 2020 21:06:37 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id z6so353450plk.10 for ; Tue, 28 Apr 2020 21:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=b1uKb70LXRyDSBLoWl8yZQ9BoF1bc2+mOEiuStCSyF4=; b=k0HpuL4kVE3cRTv9ydck06w1AmdRnEK2xmdH96NbFmjVHmC8C1mZJLopAjAcg4/eW0 M0IZGdW4fme+TcVtiQMVjQIycMsM1GfuJIXzp08RyhhxUd2lijDHGu2dWZVKT5/RLTC6 FYBFU+Gu+2OEIdV2AVO/Bo2i22rzLslO2BCzM6EsbpjQ5jVyhy/U4Ibakfx1qBid53Nk oCsmEyByAleMqtk7m89lSVt+AQF9bdv7OBHo12UrwBGxpH93I2m0QAYdHTrd02j8X4UT yiTV9b43GjzUQ64manUDGv1a0NfUWwXvdGDo9M+SHRWUyYgBhbKi3QPKnHipo5sWRJV8 xVPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b1uKb70LXRyDSBLoWl8yZQ9BoF1bc2+mOEiuStCSyF4=; b=eyna+zw+aZxp2vNs3CSaoJefOstdiCADq3rYDJ2q8C5z6Eq+jjKPseL/Nmgr/oKI7c v9YPvgnOR14vIm3fqJRrPa2vpyFZk8ierUXNCHvLZKbQRmQNo1UrVX0Xe3Igzbuag3Nc 1nT0Xm7pW3qxzDbolZxJFwbbcfgx3TPKl1/NP05ppI3YBmmnRDCuvsrJEj9JfJSr+gPF oSGu2Dw0pAbGu6hC+QvO7/zm7MM2gtStfSfN6V81ps4iEja9y7dgUVZRezwpoeNPqZT8 i34aS4ye3z+eBVaXzRu6daRuHCE+XZgutpRFV1byhi3WhWSqr0n7JzAT9p+/3Nm8AIgj aOJg== X-Gm-Message-State: AGi0PuY5d5eU4fPhishQN8mexYWF4Et0LaagPv+RVDlC0MkVhnxZ1v5c r2ImMc9iao0J21yx+9IWnLuamHJipx4= X-Google-Smtp-Source: APiQypJ/ODU1hjlPBYJVKSuNa0z0zZ9yoUofbzEHSG8GxYVCvlIuZFygtV6Gc1K9snUeH3juRgseqA== X-Received: by 2002:a17:902:b097:: with SMTP id p23mr32428938plr.195.1588133195916; Tue, 28 Apr 2020 21:06:35 -0700 (PDT) Received: from localhost.localdomain (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id i25sm16103370pfo.196.2020.04.28.21.06.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 21:06:35 -0700 (PDT) From: Rosen Penev To: linux-media@vger.kernel.org Subject: [PATCH 7/7] utils: switch C to C++ headers Date: Tue, 28 Apr 2020 21:06:27 -0700 Message-Id: <20200429040627.27859-7-rosenp@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200429040627.27859-1-rosenp@gmail.com> References: <20200429040627.27859-1-rosenp@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Recently, I changed exit() to the std variant, which caused build failures on older platforms. Switch all headers to the C++ variants to avoid this. These C headers are deprecated by C++14. Signed-off-by: Rosen Penev --- utils/cec-compliance/cec-compliance.cpp | 10 +++++----- utils/cec-compliance/cec-test-adapter.cpp | 10 +++++----- utils/cec-compliance/cec-test-audio.cpp | 10 +++++----- utils/cec-compliance/cec-test-fuzzing.cpp | 10 +++++----- utils/cec-compliance/cec-test-power.cpp | 10 +++++----- utils/cec-compliance/cec-test.cpp | 8 ++++---- utils/cec-ctl/cec-ctl.cpp | 10 +++++----- utils/cec-ctl/cec-pin.cpp | 12 ++++++------ utils/cec-follower/cec-follower.cpp | 8 ++++---- utils/cec-follower/cec-processing.cpp | 10 +++++----- utils/cec-follower/cec-tuner.cpp | 2 +- utils/common/media-info.cpp | 10 +++++----- utils/common/v4l2-info.cpp | 10 +++++----- utils/libcecutil/cec-info.cpp | 2 +- utils/libcecutil/cec-log.cpp | 8 ++++---- utils/libcecutil/cec-parse.cpp | 10 +++++----- utils/rds-ctl/rds-ctl.cpp | 14 +++++++------- utils/v4l2-compliance/v4l2-compliance.cpp | 12 ++++++------ utils/v4l2-compliance/v4l2-test-buffers.cpp | 10 +++++----- utils/v4l2-compliance/v4l2-test-codecs.cpp | 12 ++++++------ utils/v4l2-compliance/v4l2-test-colors.cpp | 12 ++++++------ utils/v4l2-compliance/v4l2-test-controls.cpp | 10 +++++----- utils/v4l2-compliance/v4l2-test-debug.cpp | 12 ++++++------ utils/v4l2-compliance/v4l2-test-formats.cpp | 12 ++++++------ utils/v4l2-compliance/v4l2-test-input-output.cpp | 10 +++++----- utils/v4l2-compliance/v4l2-test-io-config.cpp | 10 +++++----- utils/v4l2-compliance/v4l2-test-media.cpp | 12 ++++++------ utils/v4l2-compliance/v4l2-test-subdevs.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-common.cpp | 10 +++++----- utils/v4l2-ctl/v4l2-ctl-edid.cpp | 8 ++++---- utils/v4l2-ctl/v4l2-ctl-io.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-meta.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-misc.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-modes.cpp | 4 ++-- utils/v4l2-ctl/v4l2-ctl-overlay.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-sdr.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-selection.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-stds.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 10 +++++----- utils/v4l2-ctl/v4l2-ctl-subdev.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-tuner.cpp | 10 +++++----- utils/v4l2-ctl/v4l2-ctl-vbi.cpp | 10 +++++----- utils/v4l2-ctl/v4l2-ctl-vidcap.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl-vidout.cpp | 12 ++++++------ utils/v4l2-ctl/v4l2-ctl.cpp | 12 ++++++------ utils/v4l2-dbg/v4l2-dbg.cpp | 10 +++++----- 46 files changed, 236 insertions(+), 236 deletions(-) diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp index ced256f2..8a520786 100644 --- a/utils/cec-compliance/cec-compliance.cpp +++ b/utils/cec-compliance/cec-compliance.cpp @@ -4,17 +4,17 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/cec-compliance/cec-test-adapter.cpp b/utils/cec-compliance/cec-test-adapter.cpp index df7374df..b7a8159d 100644 --- a/utils/cec-compliance/cec-test-adapter.cpp +++ b/utils/cec-compliance/cec-test-adapter.cpp @@ -4,16 +4,16 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/cec-compliance/cec-test-audio.cpp b/utils/cec-compliance/cec-test-audio.cpp index d422a7da..edf528c9 100644 --- a/utils/cec-compliance/cec-test-audio.cpp +++ b/utils/cec-compliance/cec-test-audio.cpp @@ -4,15 +4,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include diff --git a/utils/cec-compliance/cec-test-fuzzing.cpp b/utils/cec-compliance/cec-test-fuzzing.cpp index ce0bf12d..708a8ec3 100644 --- a/utils/cec-compliance/cec-test-fuzzing.cpp +++ b/utils/cec-compliance/cec-test-fuzzing.cpp @@ -4,15 +4,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/cec-compliance/cec-test-power.cpp b/utils/cec-compliance/cec-test-power.cpp index 2758c36d..e35264aa 100644 --- a/utils/cec-compliance/cec-test-power.cpp +++ b/utils/cec-compliance/cec-test-power.cpp @@ -4,15 +4,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp index 75e56fde..ac99eeba 100644 --- a/utils/cec-compliance/cec-test.cpp +++ b/utils/cec-compliance/cec-test.cpp @@ -6,14 +6,14 @@ #include #include -#include -#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp index c7fd7cd8..de7bfc97 100644 --- a/utils/cec-ctl/cec-ctl.cpp +++ b/utils/cec-ctl/cec-ctl.cpp @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -15,10 +15,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/utils/cec-ctl/cec-pin.cpp b/utils/cec-ctl/cec-pin.cpp index c09d6bbd..3ff4734f 100644 --- a/utils/cec-ctl/cec-pin.cpp +++ b/utils/cec-ctl/cec-pin.cpp @@ -4,19 +4,19 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/utils/cec-follower/cec-follower.cpp b/utils/cec-follower/cec-follower.cpp index 3314a0a1..2819c769 100644 --- a/utils/cec-follower/cec-follower.cpp +++ b/utils/cec-follower/cec-follower.cpp @@ -6,15 +6,15 @@ #include #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp index bc8c9c09..e2c5c8e2 100644 --- a/utils/cec-follower/cec-processing.cpp +++ b/utils/cec-follower/cec-processing.cpp @@ -4,16 +4,16 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include diff --git a/utils/cec-follower/cec-tuner.cpp b/utils/cec-follower/cec-tuner.cpp index 4aecebce..7ac0decb 100644 --- a/utils/cec-follower/cec-tuner.cpp +++ b/utils/cec-follower/cec-tuner.cpp @@ -4,7 +4,7 @@ */ #include -#include +#include #include "cec-follower.h" #include "compiler.h" diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp index 89dfe2d7..11141677 100644 --- a/utils/common/media-info.cpp +++ b/utils/common/media-info.cpp @@ -4,15 +4,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/common/v4l2-info.cpp b/utils/common/v4l2-info.cpp index 0aac8504..28116fd3 100644 --- a/utils/common/v4l2-info.cpp +++ b/utils/common/v4l2-info.cpp @@ -4,15 +4,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/libcecutil/cec-info.cpp b/utils/libcecutil/cec-info.cpp index 6741e358..b91de313 100644 --- a/utils/libcecutil/cec-info.cpp +++ b/utils/libcecutil/cec-info.cpp @@ -5,7 +5,7 @@ * Copyright 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved. */ -#include +#include #include #include #include diff --git a/utils/libcecutil/cec-log.cpp b/utils/libcecutil/cec-log.cpp index 9410c071..84eef739 100644 --- a/utils/libcecutil/cec-log.cpp +++ b/utils/libcecutil/cec-log.cpp @@ -4,11 +4,11 @@ */ #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include #include "cec-htng-funcs.h" diff --git a/utils/libcecutil/cec-parse.cpp b/utils/libcecutil/cec-parse.cpp index 54c000bb..b7d2d206 100644 --- a/utils/libcecutil/cec-parse.cpp +++ b/utils/libcecutil/cec-parse.cpp @@ -4,8 +4,8 @@ */ #include -#include -#include +#include +#include #include #include #include @@ -13,10 +13,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp index 00908533..9ff5766f 100644 --- a/utils/rds-ctl/rds-ctl.cpp +++ b/utils/rds-ctl/rds-ctl.cpp @@ -8,21 +8,21 @@ */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index 6c92b901..6721dd20 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -21,22 +21,22 @@ #include #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include -#include +#include #include #include "v4l2-compliance.h" diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index fc49fff6..e2df126d 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -19,9 +19,9 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/v4l2-compliance/v4l2-test-codecs.cpp b/utils/v4l2-compliance/v4l2-test-codecs.cpp index 3fd44c8b..377574ec 100644 --- a/utils/v4l2-compliance/v4l2-test-codecs.cpp +++ b/utils/v4l2-compliance/v4l2-test-codecs.cpp @@ -19,17 +19,17 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include -#include +#include #include "v4l2-compliance.h" int testEncoder(struct node *node) diff --git a/utils/v4l2-compliance/v4l2-test-colors.cpp b/utils/v4l2-compliance/v4l2-test-colors.cpp index 09d29a3e..6996877d 100644 --- a/utils/v4l2-compliance/v4l2-test-colors.cpp +++ b/utils/v4l2-compliance/v4l2-test-colors.cpp @@ -15,19 +15,19 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include "compiler.h" #include "v4l2-compliance.h" diff --git a/utils/v4l2-compliance/v4l2-test-controls.cpp b/utils/v4l2-compliance/v4l2-test-controls.cpp index d81dddb2..c3c27119 100644 --- a/utils/v4l2-compliance/v4l2-test-controls.cpp +++ b/utils/v4l2-compliance/v4l2-test-controls.cpp @@ -19,15 +19,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include diff --git a/utils/v4l2-compliance/v4l2-test-debug.cpp b/utils/v4l2-compliance/v4l2-test-debug.cpp index 3f43e661..206b4b82 100644 --- a/utils/v4l2-compliance/v4l2-test-debug.cpp +++ b/utils/v4l2-compliance/v4l2-test-debug.cpp @@ -19,19 +19,19 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include "v4l2-compliance.h" int testRegister(struct node *node) diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/utils/v4l2-compliance/v4l2-test-formats.cpp index 4ea97ee7..70df465c 100644 --- a/utils/v4l2-compliance/v4l2-test-formats.cpp +++ b/utils/v4l2-compliance/v4l2-test-formats.cpp @@ -19,17 +19,17 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include -#include +#include #include "compiler.h" #include "v4l2-compliance.h" diff --git a/utils/v4l2-compliance/v4l2-test-input-output.cpp b/utils/v4l2-compliance/v4l2-test-input-output.cpp index fb8d12b1..e597d126 100644 --- a/utils/v4l2-compliance/v4l2-test-input-output.cpp +++ b/utils/v4l2-compliance/v4l2-test-input-output.cpp @@ -19,15 +19,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include "v4l2-compliance.h" diff --git a/utils/v4l2-compliance/v4l2-test-io-config.cpp b/utils/v4l2-compliance/v4l2-test-io-config.cpp index 9ade11e8..be885cb3 100644 --- a/utils/v4l2-compliance/v4l2-test-io-config.cpp +++ b/utils/v4l2-compliance/v4l2-test-io-config.cpp @@ -19,15 +19,15 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include "v4l2-compliance.h" diff --git a/utils/v4l2-compliance/v4l2-test-media.cpp b/utils/v4l2-compliance/v4l2-test-media.cpp index bcd8a725..94c25932 100644 --- a/utils/v4l2-compliance/v4l2-test-media.cpp +++ b/utils/v4l2-compliance/v4l2-test-media.cpp @@ -19,19 +19,19 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/utils/v4l2-compliance/v4l2-test-subdevs.cpp b/utils/v4l2-compliance/v4l2-test-subdevs.cpp index 489639fb..54d3c430 100644 --- a/utils/v4l2-compliance/v4l2-test-subdevs.cpp +++ b/utils/v4l2-compliance/v4l2-test-subdevs.cpp @@ -19,17 +19,17 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include -#include +#include #include "v4l2-compliance.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp index 632ada9e..c33f4d46 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp @@ -1,18 +1,18 @@ #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-edid.cpp b/utils/v4l2-ctl/v4l2-ctl-edid.cpp index 3c09de7a..eb8543f3 100644 --- a/utils/v4l2-ctl/v4l2-ctl-edid.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-edid.cpp @@ -1,12 +1,12 @@ #include #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-io.cpp b/utils/v4l2-ctl/v4l2-ctl-io.cpp index 8b6650a4..c4b13d65 100644 --- a/utils/v4l2-ctl/v4l2-ctl-io.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-io.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-meta.cpp b/utils/v4l2-ctl/v4l2-ctl-meta.cpp index baf405e8..867342b9 100644 --- a/utils/v4l2-ctl/v4l2-ctl-meta.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-meta.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-misc.cpp b/utils/v4l2-ctl/v4l2-ctl-misc.cpp index 365a03ef..e35beac8 100644 --- a/utils/v4l2-ctl/v4l2-ctl-misc.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-misc.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-modes.cpp b/utils/v4l2-ctl/v4l2-ctl-modes.cpp index b311ce5d..e076be6e 100644 --- a/utils/v4l2-ctl/v4l2-ctl-modes.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-modes.cpp @@ -6,8 +6,8 @@ * reserved. */ -#include -#include +#include + #include "v4l2-ctl.h" static bool valid_params(int width, int height, int refresh_rate) diff --git a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp index 0c67a916..4b9ff077 100644 --- a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include diff --git a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp index 5101f66c..8d045660 100644 --- a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-selection.cpp b/utils/v4l2-ctl/v4l2-ctl-selection.cpp index 017ac0bf..9b53f4c8 100644 --- a/utils/v4l2-ctl/v4l2-ctl-selection.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-selection.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-stds.cpp b/utils/v4l2-ctl/v4l2-ctl-stds.cpp index f36f8fbd..02f72f25 100644 --- a/utils/v4l2-ctl/v4l2-ctl-stds.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-stds.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp index 0a2b2205..1ba5adcd 100644 --- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -11,13 +11,13 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include #include "compiler.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-subdev.cpp b/utils/v4l2-ctl/v4l2-ctl-subdev.cpp index d1699635..a89fbaf9 100644 --- a/utils/v4l2-ctl/v4l2-ctl-subdev.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-subdev.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp index cf2fd8af..96be564e 100644 --- a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp @@ -1,14 +1,14 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp index e6795ac2..f554aaf1 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp @@ -1,19 +1,19 @@ #include #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "compiler.h" #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp index a185e33b..3d0d5620 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-vidout.cpp b/utils/v4l2-ctl/v4l2-ctl-vidout.cpp index e3cb4bcb..39952eef 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vidout.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vidout.cpp @@ -1,18 +1,18 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index 844c1af9..9f7e8117 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -21,22 +21,22 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp index 04ec6475..5fd1a1d5 100644 --- a/utils/v4l2-dbg/v4l2-dbg.cpp +++ b/utils/v4l2-dbg/v4l2-dbg.cpp @@ -17,18 +17,18 @@ */ #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include -#include +#include #ifdef ANDROID #include