Ver código fonte

Fix warnings in raylib for MSVC (#3004)

pull/3014/head
Jeffery Myers 2 anos atrás
committed by GitHub
pai
commit
e57ee9c0e8
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
2 arquivos alterados com 9 adições e 1 exclusões
  1. +8
    -0
      src/raudio.c
  2. +1
    -1
      src/utils.c

+ 8
- 0
src/raudio.c Ver arquivo

@ -228,6 +228,14 @@ typedef struct tagBITMAPINFOHEADER {
#define QOA_MALLOC RL_MALLOC #define QOA_MALLOC RL_MALLOC
#define QOA_FREE RL_FREE #define QOA_FREE RL_FREE
#if defined(_MSC_VER ) // par shapes has 2 warnings on windows, so disable them just fof this file
#pragma warning( push )
#pragma warning( disable : 4018)
#pragma warning( disable : 4267)
#pragma warning( disable : 4244)
#endif
#define QOA_IMPLEMENTATION #define QOA_IMPLEMENTATION
#include "external/qoa.h" // QOA loading and saving functions #include "external/qoa.h" // QOA loading and saving functions
#include "external/qoaplay.c" // QOA stream playing helper functions #include "external/qoaplay.c" // QOA stream playing helper functions

+ 1
- 1
src/utils.c Ver arquivo

@ -145,7 +145,7 @@ void TraceLog(int logType, const char *text, ...)
default: break; default: break;
} }
unsigned int textSize = strlen(text);
unsigned int textSize = p">(unsigned int)strlen(text);
memcpy(buffer + strlen(buffer), text, (textSize < (MAX_TRACELOG_MSG_LENGTH - 12))? textSize : (MAX_TRACELOG_MSG_LENGTH - 12)); memcpy(buffer + strlen(buffer), text, (textSize < (MAX_TRACELOG_MSG_LENGTH - 12))? textSize : (MAX_TRACELOG_MSG_LENGTH - 12));
strcat(buffer, "\n"); strcat(buffer, "\n");
vprintf(buffer, args); vprintf(buffer, args);

Carregando…
Cancelar
Salvar