Skip to content

Commit

Permalink
Fix clang-tidy error on LLVM 16.
Browse files Browse the repository at this point in the history
Starting LLVM 16, clang-diagnostic-implicit-function-declaration is
treated as an error.
  • Loading branch information
FtZPetruska authored and sezero committed Mar 27, 2023
1 parent d3faec0 commit ea09337
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/SDL3/SDL_stdinc.h
Expand Up @@ -690,6 +690,11 @@ size_t strlcpy(char* dst, const char* src, size_t size);
size_t strlcat(char* dst, const char* src, size_t size);
#endif

/* Starting LLVM 16, the analyser errors out if these functions do not have
their prototype defined (clang-diagnostic-implicit-function-declaration) */
#include <stdlib.h>
#include <string.h>

#define SDL_malloc malloc
#define SDL_calloc calloc
#define SDL_realloc realloc
Expand Down

0 comments on commit ea09337

Please sign in to comment.