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

Warnings when compiling #90

Closed
scemama opened this issue Apr 20, 2022 · 0 comments · Fixed by #91
Closed

Warnings when compiling #90

scemama opened this issue Apr 20, 2022 · 0 comments · Fixed by #91
Labels
enhancement New feature or request

Comments

@scemama
Copy link
Member

scemama commented Apr 20, 2022

Problem with a const:

In file included from src/trexio_hdf5.h:10,
                 from src/trexio_hdf5.c:6:
src/trexio_hdf5.c:8700:39: warning: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 8700 |     if (index_p != index_sparse) FREE(index_p);
      |                                       ^~~~~~~
src/trexio_private.h:12:24: note: in definition of macro 'FREE'
   12 | #define FREE(X) { free(X) ; (X)=NULL; }
      |                        ^
In file included from src/trexio_hdf5.h:14,
                 from src/trexio_hdf5.c:6:
/usr/include/stdlib.h:482:25: note: expected 'void *' but argument is of type 'const void *'
  482 | extern void free (void *__ptr) __THROW;
      |                   ~~~~~~^~~~~

@scemama scemama added the enhancement New feature or request label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant