package/musepack: fix incompatible pointer types
PATCH 1/1 package/musepack: fix incompatible pointer types
As of GCC14, GCC no longer allows implicitly casting all pointer types to all other pointer types.
We can fix this error, by adding the appropriate cast. This patch is a port of a Gentoo patch.
Fixes:
https://autobuild.buildroot.org/results/6412fc37d533dff27f18b09c668870bebff2bec5/
--- package/musepack/0006-incompatible-pointers.patch | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+)
package/musepack/0006-incompatible-pointers.patch new file +47 -0
@@ -0,0 +1,47 @@ +Fixed incompatible pointer types + +This is due to GCC14 that no longer allows implicitly casting all pointer types +to all other pointer types. Resulting in error such as : + +output/build/musepack-475/libmpcpsy/ans.c:291:120: error: passing argument 10 of ‘FindOptimalANS’ from incompatible pointer type [-Wincompatible-pointer-types] + 291 | L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, m->SCF_Index_L, Transient ); + | ~^~~~~~~~~~~~~ + | | + | int * + +Patch downloaded from Gentoo: +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-sound/musepack-tools/files/musepack-tools-495-incompatible-pointers.patch + +Signed-off-by: Thomas Bonnefille <[email protected]> +Upstream: N/A no SCM, not active anymore + +--- musepack-tools-495/libmpcpsy/ans.c ++++ musepack-tools-495-fixed/libmpcpsy/ans.c +@@ -287,12 +287,12 @@ + // for L or M, respectively + memset ( m->FIR_L, 0, sizeof m->FIR_L ); // reset FIR + memset ( m->NS_Order_L, 0, sizeof m->NS_Order_L ); // reset Flags +- FindOptimalANS ( MaxBand, MSflag, ANSspec_L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, m->SCF_Index_L, Transient ); ++ FindOptimalANS ( MaxBand, MSflag, ANSspec_L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, (const void*)m->SCF_Index_L, Transient ); + + // for R or S, respectively + memset ( m->FIR_R, 0, sizeof m->FIR_R ); // reset FIR + memset ( m->NS_Order_R, 0, sizeof m->NS_Order_R ); // reset Flags +- FindOptimalANS ( MaxBand, MSflag, ANSspec_R, ANSspec_S, m->NS_Order_R, m->SNR_comp_R, m->FIR_R, smr.R, smr.S, m->SCF_Index_R, Transient ); ++ FindOptimalANS ( MaxBand, MSflag, ANSspec_R, ANSspec_S, m->NS_Order_R, m->SNR_comp_R, m->FIR_R, smr.R, smr.S, (const void*)m->SCF_Index_R, Transient ); + + return; + } +--- musepack-tools-495/mpcenc/mpcenc.h ++++ musepack-tools-495-fixed/mpcenc/mpcenc.h +@@ -241,8 +241,8 @@ + + float ISNR_Schaetzer ( const float* samples, const float comp, const int res); + float ISNR_Schaetzer_Trans ( const float* samples, const float comp, const int res); +-void QuantizeSubband ( unsigned int* qu_output, const float* input, const int res, float* errors, const int maxNsOrder ); +-void QuantizeSubbandWithNoiseShaping ( unsigned int* qu_output, const float* input, const int res, float* errors, const float* FIR ); ++void QuantizeSubband ( mpc_int16_t* qu_output, const float* input, const int res, float* errors, const int maxNsOrder ); ++void QuantizeSubbandWithNoiseShaping ( mpc_int16_t* qu_output, const float* input, const int res, float* errors, const float* FIR ); + + void NoiseInjectionComp ( void ); +
---
base-commit: a320dbd96d08dc5bc28614915bc664f81eb0fba0
change-id: 20250111-fix_musepack-8ef7ab9fd564
Best regards,
Signature · 6 lines
Thomas Bonnefille <[email protected]> _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 6 lines · Thomas Bonnefille via buildroot
As of GCC14, GCC no longer allows implicitly casting all pointer types to all other pointer types.
We can fix this error, by adding the appropriate cast. This patch is a port of a Gentoo patch.
Quoted 7 lines
Fixes:
https://autobuild.buildroot.org/results/6412fc37d533dff27f18b09c668870bebff2bec5/Signed-off-by Thomas Bonnefille <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 62 lines
--- package/musepack/0006-incompatible-pointers.patch | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+)package/musepack/0006-incompatible-pointers.patch new file +47
-1@@ -0,0 +1,47 @@ +Fixed incompatible pointer types + +This is due to GCC14 that no longer allows implicitly casting all pointer types +to all other pointer types. Resulting in error such as : + +output/build/musepack-475/libmpcpsy/ans.c:291:120: error: passing argument 10 of ‘FindOptimalANS’ from incompatible pointer type [-Wincompatible-pointer-types] + 291 | L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, m->SCF_Index_L, Transient ); + | ~^~~~~~~~~~~~~ + | | + | int * + +Patch downloaded from Gentoo: +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-sound/musepack-tools/files/musepack-tools-495-incompatible-pointers.patch + +Signed-off-by: Thomas Bonnefille <[email protected]> +Upstream: N/A no SCM, not active anymore + +--- musepack-tools-495/libmpcpsy/ans.c ++++ musepack-tools-495-fixed/libmpcpsy/ans.c +@@ -287,12 +287,12 @@ + // for L or M, respectively + memset ( m->FIR_L, 0, sizeof m->FIR_L ); // reset FIR + memset ( m->NS_Order_L, 0, sizeof m->NS_Order_L ); // reset Flags +- FindOptimalANS ( MaxBand, MSflag, ANSspec_L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, m->SCF_Index_L, Transient ); ++ FindOptimalANS ( MaxBand, MSflag, ANSspec_L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, (const void*)m->SCF_Index_L, Transient ); + + // for R or S, respectively + memset ( m->FIR_R, 0, sizeof m->FIR_R ); // reset FIR + memset ( m->NS_Order_R, 0, sizeof m->NS_Order_R ); // reset Flags +- FindOptimalANS ( MaxBand, MSflag, ANSspec_R, ANSspec_S, m->NS_Order_R, m->SNR_comp_R, m->FIR_R, smr.R, smr.S, m->SCF_Index_R, Transient ); ++ FindOptimalANS ( MaxBand, MSflag, ANSspec_R, ANSspec_S, m->NS_Order_R, m->SNR_comp_R, m->FIR_R, smr.R, smr.S, (const void*)m->SCF_Index_R, Transient ); + + return; + } +--- musepack-tools-495/mpcenc/mpcenc.h ++++ musepack-tools-495-fixed/mpcenc/mpcenc.h +@@ -241,8 +241,8 @@ + + float ISNR_Schaetzer ( const float* samples, const float comp, const int res); + float ISNR_Schaetzer_Trans ( const float* samples, const float comp, const int res); +-void QuantizeSubband ( unsigned int* qu_output, const float* input, const int res, float* errors, const int maxNsOrder ); +-void QuantizeSubbandWithNoiseShaping ( unsigned int* qu_output, const float* input, const int res, float* errors, const float* FIR ); ++void QuantizeSubband ( mpc_int16_t* qu_output, const float* input, const int res, float* errors, const int maxNsOrder ); ++void QuantizeSubbandWithNoiseShaping ( mpc_int16_t* qu_output, const float* input, const int res, float* errors, const float* FIR ); + + void NoiseInjectionComp ( void ); + ---base-commit:
a320dbd96d08dc5bc28614915bc664f81eb0fba0
change-id: 20250111-fix_musepack-8ef7ab9fd564
Quoted 1 line
Best regards,
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 6 lines · Thomas Bonnefille via buildroot
As of GCC14, GCC no longer allows implicitly casting all pointer types to all other pointer types.
We can fix this error, by adding the appropriate cast. This patch is a port of a Gentoo patch.
Quoted 7 lines
Fixes:
https://autobuild.buildroot.org/results/6412fc37d533dff27f18b09c668870bebff2bec5/Signed-off-by Thomas Bonnefille <[email protected]>
Applied to 2025.02.x, thanks.
Regards,
Arnout
Quoted 62 lines
--- package/musepack/0006-incompatible-pointers.patch | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+)package/musepack/0006-incompatible-pointers.patch new file +47
-1@@ -0,0 +1,47 @@ +Fixed incompatible pointer types + +This is due to GCC14 that no longer allows implicitly casting all pointer types +to all other pointer types. Resulting in error such as : + +output/build/musepack-475/libmpcpsy/ans.c:291:120: error: passing argument 10 of ‘FindOptimalANS’ from incompatible pointer type [-Wincompatible-pointer-types] + 291 | L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, m->SCF_Index_L, Transient ); + | ~^~~~~~~~~~~~~ + | | + | int * + +Patch downloaded from Gentoo: +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-sound/musepack-tools/files/musepack-tools-495-incompatible-pointers.patch + +Signed-off-by: Thomas Bonnefille <[email protected]> +Upstream: N/A no SCM, not active anymore + +--- musepack-tools-495/libmpcpsy/ans.c ++++ musepack-tools-495-fixed/libmpcpsy/ans.c +@@ -287,12 +287,12 @@ + // for L or M, respectively + memset ( m->FIR_L, 0, sizeof m->FIR_L ); // reset FIR + memset ( m->NS_Order_L, 0, sizeof m->NS_Order_L ); // reset Flags +- FindOptimalANS ( MaxBand, MSflag, ANSspec_L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, m->SCF_Index_L, Transient ); ++ FindOptimalANS ( MaxBand, MSflag, ANSspec_L, ANSspec_M, m->NS_Order_L, m->SNR_comp_L, m->FIR_L, smr.L, smr.M, (const void*)m->SCF_Index_L, Transient ); + + // for R or S, respectively + memset ( m->FIR_R, 0, sizeof m->FIR_R ); // reset FIR + memset ( m->NS_Order_R, 0, sizeof m->NS_Order_R ); // reset Flags +- FindOptimalANS ( MaxBand, MSflag, ANSspec_R, ANSspec_S, m->NS_Order_R, m->SNR_comp_R, m->FIR_R, smr.R, smr.S, m->SCF_Index_R, Transient ); ++ FindOptimalANS ( MaxBand, MSflag, ANSspec_R, ANSspec_S, m->NS_Order_R, m->SNR_comp_R, m->FIR_R, smr.R, smr.S, (const void*)m->SCF_Index_R, Transient ); + + return; + } +--- musepack-tools-495/mpcenc/mpcenc.h ++++ musepack-tools-495-fixed/mpcenc/mpcenc.h +@@ -241,8 +241,8 @@ + + float ISNR_Schaetzer ( const float* samples, const float comp, const int res); + float ISNR_Schaetzer_Trans ( const float* samples, const float comp, const int res); +-void QuantizeSubband ( unsigned int* qu_output, const float* input, const int res, float* errors, const int maxNsOrder ); +-void QuantizeSubbandWithNoiseShaping ( unsigned int* qu_output, const float* input, const int res, float* errors, const float* FIR ); ++void QuantizeSubband ( mpc_int16_t* qu_output, const float* input, const int res, float* errors, const int maxNsOrder ); ++void QuantizeSubbandWithNoiseShaping ( mpc_int16_t* qu_output, const float* input, const int res, float* errors, const float* FIR ); + + void NoiseInjectionComp ( void ); + ---base-commit:
a320dbd96d08dc5bc28614915bc664f81eb0fba0
change-id: 20250111-fix_musepack-8ef7ab9fd564
Quoted 1 line
Best regards,
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot