From: Rosen Penev <rosenp@gmail.com>
To: linux-media@vger.kernel.org
Subject: [PATCH 2/2][cppcheck: use const references
Date: Sat, 19 Sep 2020 19:49:58 -0700 [thread overview]
Message-ID: <20200920024958.8203-2-rosenp@gmail.com> (raw)
In-Reply-To: <20200920024958.8203-1-rosenp@gmail.com>
Found with constVariable
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
utils/common/media-info.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp
index 5e40bafc2..2d7caf3dd 100644
--- a/utils/common/media-info.cpp
+++ b/utils/common/media-info.cpp
@@ -439,7 +439,7 @@ static __u32 read_topology(int media_fd, __u32 major, __u32 minor,
*is_invalid = true;
return MEDIA_ENT_F_UNKNOWN;
}
- media_v2_interface &iface = v2_ifaces[i];
+ const media_v2_interface &iface = v2_ifaces[i];
for (i = 0; i < topology.num_links; i++) {
__u32 type = v2_links[i].flags & MEDIA_LNK_FL_LINK_TYPE;
@@ -486,7 +486,7 @@ static __u32 read_topology(int media_fd, __u32 major, __u32 minor,
if (is_radio)
return MEDIA_ENT_F_UNKNOWN;
- media_v2_entity &ent = v2_ents[i];
+ const media_v2_entity &ent = v2_ents[i];
printf("Entity Info:\n");
printf("\tID : 0x%08x (%u)\n", ent.id, ent.id);
printf("\tName : %s\n", ent.name);
--
2.26.2
prev parent reply other threads:[~2020-09-20 2:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 2:49 [PATCH 1/2] cppcheck: turn several references to const Rosen Penev
2020-09-20 2:49 ` Rosen Penev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200920024958.8203-2-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).