Fix warnings when building with -DSDL_LIBC=OFF on Linux
This commit is contained in:
parent
f59dbf6a12
commit
009318c5a9
3 changed files with 10 additions and 6 deletions
|
@ -69,8 +69,10 @@ void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void
|
||||||
switch (left) {
|
switch (left) {
|
||||||
case 3:
|
case 3:
|
||||||
*dstp1++ = *srcp1++;
|
*dstp1++ = *srcp1++;
|
||||||
|
SDL_FALLTHROUGH;
|
||||||
case 2:
|
case 2:
|
||||||
*dstp1++ = *srcp1++;
|
*dstp1++ = *srcp1++;
|
||||||
|
SDL_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
*dstp1++ = *srcp1++;
|
*dstp1++ = *srcp1++;
|
||||||
}
|
}
|
||||||
|
@ -84,11 +86,11 @@ void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void
|
||||||
#ifndef HAVE_LIBC
|
#ifndef HAVE_LIBC
|
||||||
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
||||||
extern void *memcpy(void *dst, const void *src, size_t len);
|
extern void *memcpy(void *dst, const void *src, size_t len);
|
||||||
#ifndef __INTEL_LLVM_COMPILER
|
#if defined(_MSC_VER) && !defined(__INTEL_LLVM_COMPILER)
|
||||||
#pragma intrinsic(memcpy)
|
#pragma intrinsic(memcpy)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __clang__
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
#pragma function(memcpy)
|
#pragma function(memcpy)
|
||||||
#endif
|
#endif
|
||||||
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
||||||
|
|
|
@ -57,11 +57,11 @@ void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void
|
||||||
#ifndef HAVE_LIBC
|
#ifndef HAVE_LIBC
|
||||||
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
||||||
extern void *memmove(void *dst, const void *src, size_t len);
|
extern void *memmove(void *dst, const void *src, size_t len);
|
||||||
#ifndef __INTEL_LLVM_COMPILER
|
#if defined(_MSC_VER) && !defined(__INTEL_LLVM_COMPILER)
|
||||||
#pragma intrinsic(memmove)
|
#pragma intrinsic(memmove)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __clang__
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
#pragma function(memmove)
|
#pragma function(memmove)
|
||||||
#endif
|
#endif
|
||||||
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
||||||
|
|
|
@ -67,8 +67,10 @@ void *SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
|
||||||
switch (left) {
|
switch (left) {
|
||||||
case 3:
|
case 3:
|
||||||
*dstp1++ = value1;
|
*dstp1++ = value1;
|
||||||
|
SDL_FALLTHROUGH;
|
||||||
case 2:
|
case 2:
|
||||||
*dstp1++ = value1;
|
*dstp1++ = value1;
|
||||||
|
SDL_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
*dstp1++ = value1;
|
*dstp1++ = value1;
|
||||||
}
|
}
|
||||||
|
@ -121,11 +123,11 @@ void *SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||||
#ifndef HAVE_LIBC
|
#ifndef HAVE_LIBC
|
||||||
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
||||||
extern void *memset(void *dst, int c, size_t len);
|
extern void *memset(void *dst, int c, size_t len);
|
||||||
#ifndef __INTEL_LLVM_COMPILER
|
#if defined(_MSC_VER) && !defined(__INTEL_LLVM_COMPILER)
|
||||||
#pragma intrinsic(memset)
|
#pragma intrinsic(memset)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __clang__
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
#pragma function(memset)
|
#pragma function(memset)
|
||||||
#endif
|
#endif
|
||||||
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue