Skip to content

Commit

Permalink
Merge pull request #4065 from t20100/fix-compilation-warnings
Browse files Browse the repository at this point in the history
silx.io.specfile, silx.math.marchingcubes: Fixed compilation warnings
  • Loading branch information
payno authored Feb 14, 2024
2 parents 6103895 + 2e7da8a commit 08084ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
6 changes: 5 additions & 1 deletion src/silx/io/specfile/src/sfinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ static void
sfAssignScanNumbers(SpecFile *sf) {

int i;
long bytesread;
char *ptr;
char buffer[50];
char buffer2[50];
Expand All @@ -805,7 +806,10 @@ sfAssignScanNumbers(SpecFile *sf) {
scan = (SpecScan *) object->contents;

lseek(sf->fd,scan->offset,SEEK_SET);
read(sf->fd,buffer,sizeof(buffer));
bytesread = read(sf->fd,buffer,sizeof(buffer));
if (bytesread <= 4) {
continue;
}
buffer[49] = '\0';

for ( ptr = buffer+3,i=0; *ptr != ' ';ptr++,i++) buffer2[i] = *ptr;
Expand Down
13 changes: 0 additions & 13 deletions src/silx/math/marchingcubes.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,6 @@ cimport cython
cimport silx.math.mc as mc


# From numpy_common.pxi to avoid warnings while compiling C code
# See this thread:
# https://mail.python.org/pipermail//cython-devel/2012-March/002137.html
cdef extern from *:
bint FALSE "0"
void import_array()
void import_umath()

if FALSE:
import_array()
import_umath()


cdef class MarchingCubes:
"""Compute isosurface using marching cubes algorithm.
Expand Down

0 comments on commit 08084ff

Please sign in to comment.