aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-10-03 15:44:35 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-10-30 16:13:07 +0100
commit225c6c2a17bec0e07c13ebb891e062ccef051180 (patch)
tree3565d3aefc39a5a5ba491a9b99f289b2fa0f5cee
parent8755686268de6dc3dbbba865ec1384efb347ce95 (diff)
clang-tidy: add a bunch of const
Found with cppcoreguidelines-interfaces-global-init Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--lib/libv4lconvert/processing/autogain.c2
-rw-r--r--lib/libv4lconvert/processing/gamma.c2
-rw-r--r--lib/libv4lconvert/processing/libv4lprocessing-priv.h6
-rw-r--r--lib/libv4lconvert/processing/libv4lprocessing.c2
-rw-r--r--lib/libv4lconvert/processing/whitebalance.c2
-rw-r--r--utils/cec-compliance/cec-test.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/libv4lconvert/processing/autogain.c b/lib/libv4lconvert/processing/autogain.c
index 7b4f91f7..aef06b05 100644
--- a/lib/libv4lconvert/processing/autogain.c
+++ b/lib/libv4lconvert/processing/autogain.c
@@ -213,6 +213,6 @@ static int autogain_calculate_lookup_tables(
return 0;
}
-struct v4lprocessing_filter autogain_filter = {
+const struct v4lprocessing_filter autogain_filter = {
autogain_active, autogain_calculate_lookup_tables
};
diff --git a/lib/libv4lconvert/processing/gamma.c b/lib/libv4lconvert/processing/gamma.c
index 73129637..d65068f0 100644
--- a/lib/libv4lconvert/processing/gamma.c
+++ b/lib/libv4lconvert/processing/gamma.c
@@ -57,6 +57,6 @@ static int gamma_calculate_lookup_tables(
return 1;
}
-struct v4lprocessing_filter gamma_filter = {
+const struct v4lprocessing_filter gamma_filter = {
gamma_active, gamma_calculate_lookup_tables
};
diff --git a/lib/libv4lconvert/processing/libv4lprocessing-priv.h b/lib/libv4lconvert/processing/libv4lprocessing-priv.h
index e4a29dd9..9f0b7493 100644
--- a/lib/libv4lconvert/processing/libv4lprocessing-priv.h
+++ b/lib/libv4lconvert/processing/libv4lprocessing-priv.h
@@ -61,8 +61,8 @@ struct v4lprocessing_filter {
unsigned char *buf, const struct v4l2_format *fmt);
};
-extern struct v4lprocessing_filter whitebalance_filter;
-extern struct v4lprocessing_filter autogain_filter;
-extern struct v4lprocessing_filter gamma_filter;
+extern const struct v4lprocessing_filter whitebalance_filter;
+extern const struct v4lprocessing_filter autogain_filter;
+extern const struct v4lprocessing_filter gamma_filter;
#endif
diff --git a/lib/libv4lconvert/processing/libv4lprocessing.c b/lib/libv4lconvert/processing/libv4lprocessing.c
index b061f504..cbe5a839 100644
--- a/lib/libv4lconvert/processing/libv4lprocessing.c
+++ b/lib/libv4lconvert/processing/libv4lprocessing.c
@@ -27,7 +27,7 @@
#include "libv4lprocessing-priv.h"
#include "../libv4lconvert-priv.h" /* for PIX_FMT defines */
-static struct v4lprocessing_filter *filters[] = {
+static const struct v4lprocessing_filter *filters[] = {
&whitebalance_filter,
&autogain_filter,
&gamma_filter,
diff --git a/lib/libv4lconvert/processing/whitebalance.c b/lib/libv4lconvert/processing/whitebalance.c
index c74069ae..367dcb7f 100644
--- a/lib/libv4lconvert/processing/whitebalance.c
+++ b/lib/libv4lconvert/processing/whitebalance.c
@@ -205,6 +205,6 @@ static int whitebalance_calculate_lookup_tables(
return 0; /* Should never happen */
}
-struct v4lprocessing_filter whitebalance_filter = {
+const struct v4lprocessing_filter whitebalance_filter = {
whitebalance_active, whitebalance_calculate_lookup_tables
};
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index 8633171a..8a9ea2af 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -1414,7 +1414,7 @@ static struct remote_subtest post_test_subtests[] = {
};
-static struct remote_test tests[] = {
+static const struct remote_test tests[] = {
test_case("Core",
TAG_CORE,
core_subtests),

Privacy Policy