Skip to content

Commit

Permalink
Possible fix for Windows compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
boazsegev committed Apr 2, 2024
1 parent 1e6a093 commit c3cc9c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions fio-stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1124,10 +1124,10 @@ FIO_IFUNC void *fio___memcpy_unsafe_63x(void *restrict d_,
const char *restrict s = (const char *restrict)s_;
#define FIO___MEMCPY_XX_GROUP(bytes) \
do { \
fio_memcpy##bytes(d, s); \
fio_memcpy##bytes((void *)d, (void *)s); \
d += l & (bytes - 1); \
s += l & (bytes - 1); \
fio_memcpy##bytes(d, s); \
fio_memcpy##bytes((void *)d, (void *)s); \
return (void *)(d += bytes); \
} while (0)
if (l > 31)
Expand Down Expand Up @@ -1159,7 +1159,7 @@ FIO_SFUNC void *fio___memcpy_unsafe_x(void *restrict d_,
return fio___memcpy_unsafe_63x(d_, s_, l);
#define FIO___MEMCPY_UNSAFE_STEP(bytes) \
do { \
fio_memcpy##bytes(d, s); \
fio_memcpy##bytes((void *)d, (void *)s); \
(l -= bytes), (d += bytes), (s += bytes); \
} while (0)

Expand All @@ -1179,7 +1179,7 @@ FIO_SFUNC void *fio___memcpy_unsafe_x(void *restrict d_,
s -= 64;
d += l & 63U;
s += l & 63U;
fio_memcpy64(d, s);
fio_memcpy64((void *)d, (void *)s);
return (void *)(d += 64);
}

Expand Down
8 changes: 4 additions & 4 deletions fio-stl/000 core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1087,10 +1087,10 @@ FIO_IFUNC void *fio___memcpy_unsafe_63x(void *restrict d_,
const char *restrict s = (const char *restrict)s_;
#define FIO___MEMCPY_XX_GROUP(bytes) \
do { \
fio_memcpy##bytes(d, s); \
fio_memcpy##bytes((void *)d, (void *)s); \
d += l & (bytes - 1); \
s += l & (bytes - 1); \
fio_memcpy##bytes(d, s); \
fio_memcpy##bytes((void *)d, (void *)s); \
return (void *)(d += bytes); \
} while (0)
if (l > 31)
Expand Down Expand Up @@ -1122,7 +1122,7 @@ FIO_SFUNC void *fio___memcpy_unsafe_x(void *restrict d_,
return fio___memcpy_unsafe_63x(d_, s_, l);
#define FIO___MEMCPY_UNSAFE_STEP(bytes) \
do { \
fio_memcpy##bytes(d, s); \
fio_memcpy##bytes((void *)d, (void *)s); \
(l -= bytes), (d += bytes), (s += bytes); \
} while (0)

Expand All @@ -1142,7 +1142,7 @@ FIO_SFUNC void *fio___memcpy_unsafe_x(void *restrict d_,
s -= 64;
d += l & 63U;
s += l & 63U;
fio_memcpy64(d, s);
fio_memcpy64((void *)d, (void *)s);
return (void *)(d += 64);
}

Expand Down

0 comments on commit c3cc9c2

Please sign in to comment.