SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 48397683b828ea855c1c2e698adfef0b56df50c0 parent 0b2411ecc6ea63902bc96e91ba115942984dfcbe Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 30 Jul 2021 13:50:26 +0300 Merge pull request #389 from tommitytom/master Fix Windows build in clang-cl Diffstat:
| M | Windows/stdio.h | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Windows/stdio.h b/Windows/stdio.h @@ -11,7 +11,7 @@ int access(const char *filename, int mode); static inline int vasprintf(char **str, const char *fmt, va_list args) { size_t size = _vscprintf(fmt, args) + 1; - *str = malloc(size); + *str = (char*)malloc(size); int ret = vsprintf(*str, fmt, args); if (ret != size - 1) { free(*str); @@ -24,7 +24,7 @@ static inline int vasprintf(char **str, const char *fmt, va_list args) #endif /* This code is public domain -- Will Hartung 4/9/09 */ -static inline size_t getline(char **lineptr, size_t *n, FILE *stream) +static inline size_t getline(char **lineptr, size_t *n, FILE *stream) { char *bufptr = NULL; char *p = bufptr; @@ -48,7 +48,7 @@ static inline size_t getline(char **lineptr, size_t *n, FILE *stream) return -1; } if (bufptr == NULL) { - bufptr = malloc(128); + bufptr = (char*)malloc(128); if (bufptr == NULL) { return -1; } @@ -58,7 +58,7 @@ static inline size_t getline(char **lineptr, size_t *n, FILE *stream) while (c != EOF) { if ((p - bufptr) > (size - 1)) { size = size + 128; - bufptr = realloc(bufptr, size); + bufptr = (char*)realloc(bufptr, size); if (bufptr == NULL) { return -1; }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.