Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails with clang-16: incompatible function pointer types initializing 'cookie_read_function_t *' (aka 'long (*)(void *, char *, unsigned long)') with an expression of type 'cr_retcount (void *, char *, cr_count)' (aka 'int (void *, char *, int)') #503

Open
Tracked by #535
yurivict opened this issue Jul 5, 2023 · 0 comments

Comments

@yurivict
Copy link
Contributor

yurivict commented Jul 5, 2023

cc -Isrc/libcriterion.so.3.2.0.p -Isrc -I../src -I../dependencies/valgrind/include -Iinclude -I../include -I/usr/local/include -I/usr/local/include/klib -I/wrkdirs/usr/ports/devel/criterion/work/debugbreak-83bf7e9 -fno-color-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-unused-parameter -Wno-unused-value -fvisibility=hidden -fexceptions -DCRITERION_BUILDING_DLL=1 -DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1 -D_GNU_SOURCE '-DGETTEXT_PACKAGE="criterion"' -O2 -pipe -fPIC -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -DBXF_STATIC_LIB=1 -pthread -D__USE_MINGW_ANSI_STDIO -MD -MQ src/libcriterion.so.3.2.0.p/compat_mockfile.c.o -MF src/libcriterion.so.3.2.0.p/compat_mockfile.c.o.d -o src/libcriterion.so.3.2.0.p/compat_mockfile.c.o -c ../src/compat/mockfile.c
../src/compat/mockfile.c:176:18: error: incompatible function pointer types initializing 'cookie_read_function_t *' (aka 'long (*)(void *, char *, unsigned long)') with an expression of type 'cr_retcount (void *, char *, cr_count)' (aka 'int (void *, char *, int)') [-Wincompatible-function-pointer-types]
        .read  = mock_file_read,
                 ^~~~~~~~~~~~~~
../src/compat/mockfile.c:177:18: error: incompatible function pointer types initializing 'cookie_write_function_t *' (aka 'long (*)(void *, const char *, unsigned long)') with an expression of type 'cr_retcount (void *, const char *, cr_count)' (aka 'int (void *, const char *, int)') [-Wincompatible-function-pointer-types]
        .write = mock_file_write,
                 ^~~~~~~~~~~~~~~

Version: 2.4.2
FreeBSD 13.2

@MrAnno MrAnno mentioned this issue May 2, 2024
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant