Skip to content

Commit f8302b0

Browse files
committed
address compiler warnings
1 parent 01b2939 commit f8302b0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ImageStreamIO.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@ errno_t ImageStreamIO_image_sizing(IMAGE *image, uint8_t* map)
918918
return IMAGESTREAMIO_INVALIDARG;
919919
}
920920
// N.B. no break, fall through to previous axis
921+
// fall through
921922
case 2:
922923
if (image->md->size[1] < 1)
923924
{
@@ -927,6 +928,7 @@ errno_t ImageStreamIO_image_sizing(IMAGE *image, uint8_t* map)
927928
return IMAGESTREAMIO_INVALIDARG;
928929
}
929930
// N.B. no break, fall through to previous axis
931+
// fall through
930932
case 1:
931933
if (image->md->size[0] < 1)
932934
{
@@ -965,7 +967,7 @@ errno_t ImageStreamIO_image_sizing(IMAGE *image, uint8_t* map)
965967
"temporal circular buffer needs 3 dimensions");
966968
return IMAGESTREAMIO_INVALIDARG;
967969
}
968-
if (image->md->shared < 0 || image->md->shared > 1 )
970+
if ( image->md->shared > 1 )
969971
{
970972
ImageStreamIO_printERROR(IMAGESTREAMIO_INVALIDARG,
971973
"Error calling ImageStreamIO_image_sizing, "
@@ -1666,7 +1668,7 @@ errno_t ImageStreamIO_read_sharedmem_image_toIMAGE(
16661668
}
16671669
file_stat.st_size = 0;
16681670
fstat(SM_fd, &file_stat);
1669-
} while (file_stat.st_size <= sizeof(IMAGE_METADATA));
1671+
} while ((int) file_stat.st_size <= (int) sizeof(IMAGE_METADATA));
16701672

16711673
uint8_t *map_root = (uint8_t *)mmap(0, file_stat.st_size, PROT_READ | PROT_WRITE,
16721674
MAP_SHARED, SM_fd, 0);
@@ -1681,7 +1683,7 @@ errno_t ImageStreamIO_read_sharedmem_image_toIMAGE(
16811683
image->md = (IMAGE_METADATA *)map_root;
16821684

16831685
ierrno = ImageStreamIO_image_sizing(image, map_root);
1684-
if (IMAGESTREAMIO_SUCCESS != ierrno || image->memsize != file_stat.st_size)
1686+
if (IMAGESTREAMIO_SUCCESS != ierrno || ((int) image->memsize != (int) file_stat.st_size))
16851687
{
16861688
ImageStreamIO_printERROR(IMAGESTREAMIO_FILEOPEN, "Error in the file");
16871689
munmap(image->md, file_stat.st_size);

0 commit comments

Comments
 (0)