Bug 676747. qcms: Fix a warning about using the wrong function type. r=bgirard
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 05 Aug 2011 09:49:45 -0400
changeset 73924 198491e83664a4b5d70822b9a4ff1b4d8ca69b1e
parent 73923 25d81f689bd278fda4003837917e96cbc950b096
child 73925 d5db87177940e051688f289f9f76807fc90d87d3
push id20926
push usermak77@bonardo.net
push dateSat, 06 Aug 2011 09:36:25 +0000
treeherdermozilla-central@ba21778fcc14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgirard
bugs676747
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 676747. qcms: Fix a warning about using the wrong function type. r=bgirard
gfx/qcms/chain.c
gfx/qcms/qcmsint.h
--- a/gfx/qcms/chain.c
+++ b/gfx/qcms/chain.c
@@ -951,17 +951,17 @@ fail:
 	return EMPTY_TRANSFORM_LIST;
 }
 
 static float* qcms_modular_transform_data(struct qcms_modular_transform *transform, float *src, float *dest, size_t len)
 {
         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 &&
 		    transform_fn != qcms_transform_module_clut_only &&
 		    transform_fn != qcms_transform_module_matrix &&
 		    transform_fn != qcms_transform_module_matrix_translate &&
 		    transform_fn != qcms_transform_module_LAB_to_XYZ &&
 		    transform_fn != qcms_transform_module_XYZ_to_LAB) {
--- a/gfx/qcms/qcmsint.h
+++ b/gfx/qcms/qcmsint.h
@@ -69,16 +69,21 @@ struct _qcms_transform {
 
 	void (*transform_fn)(struct _qcms_transform *transform, unsigned char *src, unsigned char *dest, size_t length);
 };
 
 struct matrix {
 	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;
 
 	float *input_clut_table_r;
 	float *input_clut_table_g;
 	float *input_clut_table_b;
 	uint16_t input_clut_table_length;
@@ -94,17 +99,17 @@ struct qcms_modular_transform {
 	uint16_t *output_gamma_lut_r;
 	uint16_t *output_gamma_lut_g;
 	uint16_t *output_gamma_lut_b;
 
 	size_t output_gamma_lut_r_length;
 	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;
 };
 
 typedef int32_t s15Fixed16Number;
 typedef uint16_t uInt16Number;
 typedef uint8_t uInt8Number;
 
 struct XYZNumber {