mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-28 07:29:09 +00:00
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) {
|
||||
case 3:
|
||||
*dstp1++ = *srcp1++;
|
||||
SDL_FALLTHROUGH;
|
||||
case 2:
|
||||
*dstp1++ = *srcp1++;
|
||||
SDL_FALLTHROUGH;
|
||||
case 1:
|
||||
*dstp1++ = *srcp1++;
|
||||
}
|
||||
|
@ -84,11 +86,11 @@ void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void
|
|||
#ifndef HAVE_LIBC
|
||||
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
||||
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)
|
||||
#endif
|
||||
|
||||
#ifndef __clang__
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#pragma function(memcpy)
|
||||
#endif
|
||||
/* 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
|
||||
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
||||
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)
|
||||
#endif
|
||||
|
||||
#ifndef __clang__
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#pragma function(memmove)
|
||||
#endif
|
||||
/* 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) {
|
||||
case 3:
|
||||
*dstp1++ = value1;
|
||||
SDL_FALLTHROUGH;
|
||||
case 2:
|
||||
*dstp1++ = value1;
|
||||
SDL_FALLTHROUGH;
|
||||
case 1:
|
||||
*dstp1++ = value1;
|
||||
}
|
||||
|
@ -121,11 +123,11 @@ void *SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
|||
#ifndef HAVE_LIBC
|
||||
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
||||
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)
|
||||
#endif
|
||||
|
||||
#ifndef __clang__
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#pragma function(memset)
|
||||
#endif
|
||||
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue