aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-04-21 00:20:30 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-04-21 09:52:29 +0200
commit9aa8ee696d7db1fc3744aaa9d7c8b27776c44e6b (patch)
tree64b3ba473e6cd886c1887260e9df74bc7e22ccb7
parenta1369a2efd1fddeb7568b323596ab814e3ef0ecd (diff)
downloadv4l-utils-9aa8ee696d7db1fc3744aaa9d7c8b27776c44e6b.tar.gz
remove unused ARRAY_SIZE
This is a C construct that is not really needed in C++. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-compliance/cec-compliance.h3
-rw-r--r--utils/cec-ctl/cec-pin.cpp2
-rw-r--r--utils/cec-follower/cec-follower.h3
-rw-r--r--utils/cec-follower/cec-processing.cpp3
-rw-r--r--utils/rds-ctl/rds-ctl.cpp2
5 files changed, 0 insertions, 13 deletions
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 26c70c21..c558f043 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -191,9 +191,6 @@ using vec_remote_subtests = std::vector<remote_subtest>;
#define CEC_LOG_ADDR_MASK_ALL 0xffff
-#define ARRAY_SIZE(a) \
- (sizeof(a) / sizeof(*a))
-
#define COLOR_GREEN(s) "\033[32m" s "\033[0m"
#define COLOR_RED(s) "\033[1;31m" s "\033[0m"
#define COLOR_BOLD(s) "\033[1m" s "\033[0m"
diff --git a/utils/cec-ctl/cec-pin.cpp b/utils/cec-ctl/cec-pin.cpp
index f9ecac7f..30e5accf 100644
--- a/utils/cec-ctl/cec-pin.cpp
+++ b/utils/cec-ctl/cec-pin.cpp
@@ -17,8 +17,6 @@
#include "cec-ctl.h"
#include "cec-log.h"
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
static std::string find_opcode_name(__u8 opcode)
{
const char *name = cec_opcode2s(opcode);
diff --git a/utils/cec-follower/cec-follower.h b/utils/cec-follower/cec-follower.h
index 5b67a260..7806a4b6 100644
--- a/utils/cec-follower/cec-follower.h
+++ b/utils/cec-follower/cec-follower.h
@@ -20,9 +20,6 @@
#include <cec-info.h>
#include <cec-log.h>
-#define ARRAY_SIZE(a) \
- (sizeof(a) / sizeof(*a))
-
extern bool show_info;
extern bool show_msgs;
extern bool show_state;
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index 83ffcc30..02440747 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -29,9 +29,6 @@
/* Time between each polling message sent to a device */
#define POLL_PERIOD 15000
-#define ARRAY_SIZE(a) \
- (sizeof(a) / sizeof(*a))
-
struct cec_enum_values {
const char *type_name;
__u8 value;
diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp
index e2718282..8161aa45 100644
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -27,8 +27,6 @@
#include <linux/videodev2.h>
#include <libv4l2rds.h>
-#define ARRAY_SIZE(arr) ((int)(sizeof(arr) / sizeof((arr)[0])))
-
using dev_vec = std::vector<std::string>;
using dev_map = std::map<std::string, std::string>;