pyedflib icon indicating copy to clipboard operation
pyedflib copied to clipboard

Compiler warnings

Open DimitriPapadopoulos opened this issue 1 year ago • 6 comments

While building on Ubuntu 22.04:

pyedflib/_extensions/c/edflib.c:39: warning: ignoring ‘#pragma warning ’ [-Wunknown-pragmas]
   39 | #pragma warning( disable : 4996 ) // ignore unsafe strncpy
      | 
pyedflib/_extensions/c/edflib.c:40: warning: ignoring ‘#pragma warning ’ [-Wunknown-pragmas]
   40 | #pragma warning( disable : 4244 ) // ignore precision loss
      | 
pyedflib/_extensions/c/edflib.c: In function ‘edflib_check_edf_file’:
pyedflib/_extensions/c/edflib.c:2629:35: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘__off64_t’ {aka ‘long int’} [-Wformat=]
 2629 |                 printf("filesize %d != %d*%d+%d ",ftello(inputfile),edfhdr->recordsize, edfhdr->datarecords, edfhdr->hdrsize);
      |                                  ~^
      |                                   |
      |                                   int
      |                                  %ld
pyedflib/_extensions/c/edflib.c:2629:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long long int’ [-Wformat=]
 2629 |                 printf("filesize %d != %d*%d+%d ",ftello(inputfile),edfhdr->recordsize, edfhdr->datarecords, edfhdr->hdrsize);
      |                                           ~^                                            ~~~~~~~~~~~~~~~~~~~
      |                                            |                                                  |
      |                                            int                                                long long int
      |                                           %lld

/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
pyedflib/_extensions/_pyedflib.c:9231:27: warning: ‘__pyx_f_8pyedflib_11_extensions_9_pyedflib__chars’ defined but not used [-Wunused-function]
 9231 | static __Pyx_memviewslice __pyx_f_8pyedflib_11_extensions_9_pyedflib__chars(PyObject *__pyx_v_s) {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DimitriPapadopoulos avatar Jun 24 '23 12:06 DimitriPapadopoulos