@@ -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
};
@@ -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
};
@@ -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
@@ -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,
@@ -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
};
@@ -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),
Found with cppcoreguidelines-interfaces-global-init Signed-off-by: Rosen Penev <rosenp@gmail.com> --- lib/libv4lconvert/processing/autogain.c | 2 +- lib/libv4lconvert/processing/gamma.c | 2 +- lib/libv4lconvert/processing/libv4lprocessing-priv.h | 6 +++--- lib/libv4lconvert/processing/libv4lprocessing.c | 2 +- lib/libv4lconvert/processing/whitebalance.c | 2 +- utils/cec-compliance/cec-test.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-)