Fix clang++ compilation errors
clang was complaining about the type conversions. For example... ``` node_modules/raylib-src/src/core.c:1888:15: error: cannot initialize a variable of type 'char *' with an rvalue of type 'void *' char *cmd = calloc(strlen(url) + 10, sizeof(char)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
This commit is contained in:
parent
68db3a894a
commit
feb6afcd61
@ -276,7 +276,7 @@ static bool windowMinimized = false; // Check if window has been mini
|
||||
static const char *windowTitle = NULL; // Window text title...
|
||||
|
||||
static unsigned int displayWidth, displayHeight;// Display width and height (monitor, device-screen, LCD, ...)
|
||||
static int screenWidth, screenHeight; // Screen width and height (used render area)
|
||||
//static int screenWidth, screenHeight; // Screen width and height (used render area)
|
||||
static int renderWidth, renderHeight; // Framebuffer width and height (render area, including black bars if required)
|
||||
static int renderOffsetX = 0; // Offset X from render area (must be divided by 2)
|
||||
static int renderOffsetY = 0; // Offset Y from render area (must be divided by 2)
|
||||
@ -1642,7 +1642,7 @@ const char *GetFileNameWithoutExt(const char *filePath)
|
||||
|
||||
// Try to allocate new string, same size as original
|
||||
// NOTE: By default strlen() does not count the '\0' character
|
||||
if ((result = malloc(strlen(filePath) + 1)) == NULL) return NULL;
|
||||
if ((result = (char *)malloc(strlen(filePath) + 1)) == NULL) return NULL;
|
||||
|
||||
strcpy(result, filePath); // Make a copy of the string
|
||||
|
||||
@ -1885,7 +1885,7 @@ void OpenURL(const char *url)
|
||||
}
|
||||
else
|
||||
{
|
||||
char *cmd = calloc(strlen(url) + 10, sizeof(char));
|
||||
char *cmd = (char *)calloc(strlen(url) + 10, sizeof(char));
|
||||
|
||||
#if defined(_WIN32)
|
||||
sprintf(cmd, "explorer '%s'", url);
|
||||
|
Loading…
Reference in New Issue
Block a user