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 errors: incompatible pointer to integer conversion #120

Closed
thierry-FreeBSD opened this issue Aug 2, 2023 · 1 comment
Closed

Comments

@thierry-FreeBSD
Copy link

When launching make check, compilation fails with these errors (clang 16):

cc -DHAVE_CONFIG_H -I/usr/ports/science/code_saturne/work/code_saturne-8.0.0/libple -I../libple/src -I/usr/ports/science/code_saturne/work/code_saturne-8.0.0 -I../src/user -I../src/cogz -I../src/darc -I../src/cfbl -I../src/comb -I../src/ctwr -I../src/fvm -I../src/apps -I../src/elec -I../src/rayt -I../src/bft -I../src/user_examples -I../src/meg -I../src/pprt -I../src/lagr -I../src/base -I../src/mesh -I../src/alge -I../src/atmo -I../src/cdo -I../src/turb -I../src/gui -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -DMPICH_SKIP_MPICXX -I/usr/local/include/cblas -I/usr/local/include -I/usr/local/include/libxml2 -DLIBICONV_PLUG -isystem /usr/local/include -DNDEBUG -funsigned-char -Wall -Wshadow -Wpointer-arith -Wmissing-prototypes -Wuninitialized -Wunused -O2 -pipe -D__XSI_VISIBLE -Wno-error=incompatible-function-pointer-types -Wno-incompatible-pointer-types -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fopenmp=libomp -O2 -c ../tests/cs_matrix_test.c
../tests/cs_matrix_test.c:646:52: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'cs_lnum_t' (aka 'int') [-Wint-conversion]
        mav = cs_matrix_assembler_values_init(m_0, NULL, NULL);
                                                   ^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL    ((void *)0)
                ^~~~~~~~~~~
../src/alge/cs_matrix.h:640:47: note: passing argument to parameter 'diag_block_size' here
                                cs_lnum_t     diag_block_size,
                                              ^
../tests/cs_matrix_test.c:646:58: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'cs_lnum_t' (aka 'int') [-Wint-conversion]
        mav = cs_matrix_assembler_values_init(m_0, NULL, NULL);
                                                         ^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL    ((void *)0)
                ^~~~~~~~~~~
../src/alge/cs_matrix.h:641:47: note: passing argument to parameter 'extra_diag_block_size' here
                                cs_lnum_t     extra_diag_block_size);
                                              ^
../tests/cs_matrix_test.c:648:52: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'cs_lnum_t' (aka 'int') [-Wint-conversion]
        mav = cs_matrix_assembler_values_init(m_1, NULL, NULL);
                                                   ^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL    ((void *)0)
                ^~~~~~~~~~~
../src/alge/cs_matrix.h:640:47: note: passing argument to parameter 'diag_block_size' here
                                cs_lnum_t     diag_block_size,
                                              ^
../tests/cs_matrix_test.c:648:58: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'cs_lnum_t' (aka 'int') [-Wint-conversion]
        mav = cs_matrix_assembler_values_init(m_1, NULL, NULL);
                                                         ^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL    ((void *)0)
                ^~~~~~~~~~~
../src/alge/cs_matrix.h:641:47: note: passing argument to parameter 'extra_diag_block_size' here
                                cs_lnum_t     extra_diag_block_size);
                                              ^
4 errors generated.

@YvanFournier YvanFournier reopened this Aug 4, 2023
YvanFournier added a commit that referenced this issue Aug 4, 2023
This should solve GitHub issue #120.
@YvanFournier
Copy link
Contributor

Hello,

Fixed in v8.0 branch in commit 7ea539b (already correct/up to date on master branch).

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

2 participants