diff options
author | Marti Maria <marti.maria@littlecms.com> | 2020-12-08 19:16:52 +0100 |
---|---|---|
committer | Marti Maria <marti.maria@littlecms.com> | 2020-12-08 19:16:52 +0100 |
commit | b21c53594764ec65d1cdf2e91c62ec47debefe7f (patch) | |
tree | 5da4c6010a3bb3a83a1f1e702143729ce23a6150 | |
parent | fbe6fa94a82ed4636806330c0a4b4ce1a2e261f1 (diff) | |
download | lcms2-b21c53594764ec65d1cdf2e91c62ec47debefe7f.tar.gz |
Solve Incompatible function pointer type casts #145
Thanks to vlad902 for discovering the issue
-rw-r--r-- | include/lcms2_plugin.h | 7 | ||||
-rw-r--r-- | src/cmslut.c | 2 | ||||
-rw-r--r-- | src/cmsopt.c | 2 | ||||
-rw-r--r-- | src/lcms2_internal.h | 2 |
4 files changed, 4 insertions, 9 deletions
diff --git a/include/lcms2_plugin.h b/include/lcms2_plugin.h index 3b4975a..36c2f07 100644 --- a/include/lcms2_plugin.h +++ b/include/lcms2_plugin.h @@ -547,11 +547,6 @@ typedef struct { // the optimization search. Or FALSE if it is unable to optimize and want to give a chance // to the rest of optimizers. -typedef void (* _cmsOPTeval16Fn)(CMSREGISTER const cmsUInt16Number In[], - CMSREGISTER cmsUInt16Number Out[], - CMSREGISTER const void* Data); - - typedef cmsBool (* _cmsOPToptimizeFn)(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, @@ -562,7 +557,7 @@ typedef cmsBool (* _cmsOPToptimizeFn)(cmsPipeline** Lut, // duplicator and free functions should also be specified in order to duplicate the LUT construct. Use NULL to inhibit such functionality. CMSAPI void CMSEXPORT _cmsPipelineSetOptimizationParameters(cmsPipeline* Lut, - _cmsOPTeval16Fn Eval16, + _cmsInterpFn16 Eval16, void* PrivateData, _cmsFreeUserDataFn FreePrivateDataFn, _cmsDupUserDataFn DupPrivateDataFn); diff --git a/src/cmslut.c b/src/cmslut.c index e77f035..b125d75 100644 --- a/src/cmslut.c +++ b/src/cmslut.c @@ -1658,7 +1658,7 @@ cmsUInt32Number CMSEXPORT cmsPipelineStageCount(const cmsPipeline* lut) // This function may be used to set the optional evaluator and a block of private data. If private data is being used, an optional // duplicator and free functions should also be specified in order to duplicate the LUT construct. Use NULL to inhibit such functionality. void CMSEXPORT _cmsPipelineSetOptimizationParameters(cmsPipeline* Lut, - _cmsOPTeval16Fn Eval16, + _cmsInterpFn16 Eval16, void* PrivateData, _cmsFreeUserDataFn FreePrivateDataFn, _cmsDupUserDataFn DupPrivateDataFn) diff --git a/src/cmsopt.c b/src/cmsopt.c index 92ec450..bd707de 100644 --- a/src/cmsopt.c +++ b/src/cmsopt.c @@ -778,7 +778,7 @@ Error: if (DataSetIn == NULL && DataSetOut == NULL) { - _cmsPipelineSetOptimizationParameters(Dest, (_cmsOPTeval16Fn) DataCLUT->Params->Interpolation.Lerp16, DataCLUT->Params, NULL, NULL); + _cmsPipelineSetOptimizationParameters(Dest, DataCLUT->Params->Interpolation.Lerp16, DataCLUT->Params, NULL, NULL); } else { diff --git a/src/lcms2_internal.h b/src/lcms2_internal.h index a9f9cb5..7f04145 100644 --- a/src/lcms2_internal.h +++ b/src/lcms2_internal.h @@ -924,7 +924,7 @@ struct _cmsPipeline_struct { // Data & evaluators void *Data; - _cmsOPTeval16Fn Eval16Fn; + _cmsInterpFn16 Eval16Fn; _cmsPipelineEvalFloatFn EvalFloatFn; _cmsFreeUserDataFn FreeDataFn; _cmsDupUserDataFn DupDataFn; |