mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-16 16:28:14 +00:00
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:
@@ -276,7 +276,7 @@ static bool windowMinimized = false; // Check if window has been mini
|
|||||||
static const char *windowTitle = NULL; // Window text title...
|
static const char *windowTitle = NULL; // Window text title...
|
||||||
|
|
||||||
static unsigned int displayWidth, displayHeight;// Display width and height (monitor, device-screen, LCD, ...)
|
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 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 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)
|
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
|
// Try to allocate new string, same size as original
|
||||||
// NOTE: By default strlen() does not count the '\0' character
|
// 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
|
strcpy(result, filePath); // Make a copy of the string
|
||||||
|
|
||||||
@@ -1885,7 +1885,7 @@ void OpenURL(const char *url)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *cmd = calloc(strlen(url) + 10, sizeof(char));
|
char *cmd = (char *)calloc(strlen(url) + 10, sizeof(char));
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
sprintf(cmd, "explorer '%s'", url);
|
sprintf(cmd, "explorer '%s'", url);
|
||||||
|
Reference in New Issue
Block a user