aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-ctl
diff options
context:
space:
mode:
Diffstat (limited to 'utils/v4l2-ctl')
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-common.cpp4
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp1
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-vidcap.cpp4
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.cpp8
4 files changed, 9 insertions, 8 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
index ea026fd5..c8705a04 100644
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -225,7 +225,7 @@ static void list_media_devices(const std::string &media_bus_info)
return;
}
- media_v2_interface *ifaces = new media_v2_interface[topology.num_interfaces];
+ auto ifaces = new media_v2_interface[topology.num_interfaces];
topology.ptr_interfaces = (uintptr_t)ifaces;
if (!ioctl(media_fd, MEDIA_IOC_G_TOPOLOGY, &topology))
@@ -259,7 +259,7 @@ static void list_devices()
closedir(dp);
/* Find device nodes which are links to other device nodes */
- for (dev_vec::iterator iter = files.begin();
+ for (auto iter = files.begin();
iter != files.end(); ) {
char link[64+1];
int link_len;
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index d986c7b6..0c384fe9 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -1,3 +1,4 @@
+#include <algorithm>
#include <cstdlib>
#include <cstring>
diff --git a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
index 80312b51..5abab5e7 100644
--- a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
@@ -366,7 +366,7 @@ void print_touch_buffer(FILE *f, cv4l_buffer &buf, cv4l_fmt &fmt, cv4l_queue &q)
'.', ',', ':', ';', '!', '|', 'i', 'c',
'n', 'o', 'm', 'I', 'C', 'N', 'O', 'M',
};
- __s16 *vbuf = static_cast<__s16 *>(q.g_dataptr(buf.g_index(), 0));
+ auto vbuf = static_cast<__s16 *>(q.g_dataptr(buf.g_index(), 0));
__u32 x, y;
switch (fmt.g_pixelformat()) {
@@ -375,7 +375,7 @@ void print_touch_buffer(FILE *f, cv4l_buffer &buf, cv4l_fmt &fmt, cv4l_queue &q)
fprintf(f, "TD16: ");
for (x = 0; x < fmt.g_width(); x++, vbuf++) {
- __s16 v = static_cast<__s16>(le16toh(*vbuf));
+ auto v = static_cast<__s16>(le16toh(*vbuf));
if (!options[OptConcise])
fprintf(f, "% 4d", v);
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index 321d2d1c..a31b29f8 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -484,7 +484,7 @@ void printfmt(int fd, const struct v4l2_format &vfmt)
}
printf("\tClip Bitmap : %s", vfmt.fmt.win.bitmap ? "Yes, " : "No\n");
if (vfmt.fmt.win.bitmap) {
- unsigned char *bitmap = static_cast<unsigned char *>(vfmt.fmt.win.bitmap);
+ auto bitmap = static_cast<unsigned char *>(vfmt.fmt.win.bitmap);
unsigned stride = (vfmt.fmt.win.w.width + 7) / 8;
unsigned cnt = 0;
@@ -1056,11 +1056,11 @@ static const char *make_devname(const char *device, const char *devname,
return device;
}
- media_v2_entity *ents = new media_v2_entity[topology.num_entities];
+ auto ents = new media_v2_entity[topology.num_entities];
topology.ptr_entities = (uintptr_t)ents;
- media_v2_link *links = new media_v2_link[topology.num_links];
+ auto links = new media_v2_link[topology.num_links];
topology.ptr_links = (uintptr_t)links;
- media_v2_interface *ifaces = new media_v2_interface[topology.num_interfaces];
+ auto ifaces = new media_v2_interface[topology.num_interfaces];
topology.ptr_interfaces = (uintptr_t)ifaces;
unsigned i, ent_id, iface_id = 0;

Privacy Policy