Fix a warning about using the wrong function type
Mozilla bug 676747
diff --git a/chain.c b/chain.c
index 9c52e3f..a259499 100644
--- a/chain.c
+++ b/chain.c
@@ -956,7 +956,7 @@
while (transform != NULL) {
// Keep swaping src/dest when performing a transform to use less memory.
float *new_src = dest;
- const void *transform_fn = transform->transform_module_fn;
+ const transform_module_fn_t transform_fn = transform->transform_module_fn;
if (transform_fn != qcms_transform_module_gamma_table &&
transform_fn != qcms_transform_module_gamma_lut &&
transform_fn != qcms_transform_module_clut &&
diff --git a/qcmsint.h b/qcmsint.h
index 02ac5ab..0c83053 100644
--- a/qcmsint.h
+++ b/qcmsint.h
@@ -74,6 +74,11 @@
float m[3][3];
bool invalid;
};
+
+struct qcms_modular_transform;
+
+typedef void (*transform_module_fn_t)(struct qcms_modular_transform *transform, float *src, float *dest, size_t length);
+
struct qcms_modular_transform {
struct matrix matrix;
float tx, ty, tz;
@@ -99,7 +104,7 @@
size_t output_gamma_lut_g_length;
size_t output_gamma_lut_b_length;
- void (*transform_module_fn)(struct qcms_modular_transform *transform, float *src, float *dest, size_t length);
+ transform_module_fn_t transform_module_fn;
struct qcms_modular_transform *next_transform;
};