mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-03 06:04:53 +00:00
audio/libfishsound: Fix build with Clang 16 and remove the workaround
flac.c:253:8: error: incompatible function pointer types passing 'FLAC__StreamDecoderReadStatus (const FLAC__StreamDecoder *, FLAC__byte *, unsigned int *, void *)' (aka 'FLAC__StreamDecoderReadStatus (const FLAC__StreamDecoder *, unsigned char *, unsigned int *, void *)') to parameter of type 'FLAC__StreamDecoderReadCallback' (aka 'FLAC__StreamDecoderReadStatus (*)(const FLAC__StreamDecoder *, unsigned char *, unsigned long *, void *)') [-Wincompatible-function-pointer-types] fs_flac_read_callback, ^~~~~~~~~~~~~~~~~~~~~ /usr/local/include/FLAC/stream_decoder.h:1092:34: note: passing argument to parameter 'read_callback' here FLAC__StreamDecoderReadCallback read_callback, ^ flac.c:597:8: error: incompatible function pointer types passing 'FLAC__StreamEncoderWriteStatus (const FLAC__StreamEncoder *, const FLAC__byte *, unsigned int, unsigned int, unsigned int, void *)' (aka 'FLAC__StreamEncoderWriteStatus (const FLAC__StreamEncoder *, const unsigned char *, unsigned int, unsigned int, unsigned int, void *)') to parameter of type 'FLAC__StreamEncoderWriteCallback' (aka 'FLAC__StreamEncoderWriteStatus (*)(const FLAC__StreamEncoder *, const unsigned char *, unsigned long, unsigned int, unsigned int, void *)') [-Wincompatible-function-pointer-types] fs_flac_enc_write_callback, ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/FLAC/stream_encoder.h:1532:136: note: passing argument to parameter 'write_callback' here FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data); 16 warnings and 2 errors generated. Tested on: 14.0-CURRENT (1400093)
This commit is contained in:
parent
860b655d06
commit
d19fe7ff24
@ -29,12 +29,6 @@ DOXYGEN_IMPLIES=DOCS
|
||||
|
||||
DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
|
||||
CFLAGS+= -Wno-error=incompatible-function-pointer-types
|
||||
.endif
|
||||
|
||||
post-patch-DOCS-off:
|
||||
@${REINPLACE_CMD} -e '/^SUBDIRS = / s| doc||' ${WRKSRC}/Makefile.in
|
||||
|
||||
|
22
audio/libfishsound/files/patch-src-libfishsound-flac.c
Normal file
22
audio/libfishsound/files/patch-src-libfishsound-flac.c
Normal file
@ -0,0 +1,22 @@
|
||||
--- src/libfishsound/flac.c.orig 2010-02-03 13:34:02 UTC
|
||||
+++ src/libfishsound/flac.c
|
||||
@@ -106,7 +106,7 @@ fs_flac_command (FishSound * fsound, int command, void
|
||||
#if FS_DECODE
|
||||
static FLAC__StreamDecoderReadStatus
|
||||
fs_flac_read_callback(const FLAC__StreamDecoder *decoder,
|
||||
- FLAC__byte buffer[], unsigned int *bytes,
|
||||
+ FLAC__byte buffer[], size_t *bytes,
|
||||
void *client_data)
|
||||
{
|
||||
FishSound* fsound = (FishSound*)client_data;
|
||||
@@ -346,8 +346,8 @@ dec_err:
|
||||
#if FS_ENCODE
|
||||
static FLAC__StreamEncoderWriteStatus
|
||||
fs_flac_enc_write_callback(const FLAC__StreamEncoder *encoder,
|
||||
- const FLAC__byte buffer[], unsigned bytes,
|
||||
- unsigned samples, unsigned current_frame,
|
||||
+ const FLAC__byte buffer[], size_t bytes,
|
||||
+ uint32_t samples, uint32_t current_frame,
|
||||
void *client_data)
|
||||
{
|
||||
FishSound* fsound = (FishSound*)client_data;
|
Loading…
Reference in New Issue
Block a user