Skip to content

Commit 6af74f3

Browse files
committed
More casting fixes for CXX_BUILD
1 parent c2d5bd5 commit 6af74f3

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

gfx/drivers/gl3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3409,7 +3409,7 @@ static bool gl3_read_viewport(void *data, uint8_t *buffer, bool is_idle)
34093409
*
34103410
* Keep codepath similar for GLES and desktop GL.
34113411
*/
3412-
gl->readback_buffer_screenshot = malloc(num_pixels * sizeof(uint32_t));
3412+
gl->readback_buffer_screenshot = (uint32_t*)malloc(num_pixels * sizeof(uint32_t));
34133413

34143414
if (!gl->readback_buffer_screenshot)
34153415
goto error;

gfx/drivers_shader/shader_glsl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static bool gl_glsl_load_binary_shader(GLuint shader, char *save_path)
319319
shader_size=ftell (shader_binary);
320320
fseek(shader_binary, 0, SEEK_SET);
321321

322-
shader_data = malloc(shader_size);
322+
shader_data = (char*)malloc(shader_size);
323323
fread(shader_data, shader_size, 1, shader_binary);
324324
fclose(shader_binary);
325325

@@ -345,7 +345,7 @@ static void gl_glsl_dump_shader(GLuint shader, char *save_path)
345345
glGetShaderiv(shader, 0x8b89, &length);
346346

347347
bufferSize = length;
348-
shaderBinary = malloc(bufferSize);
348+
shaderBinary = (void*)malloc(bufferSize);
349349

350350
memset(shaderBinary, 0, bufferSize);
351351

input/common/linux_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ static void linux_poll_illuminance_sensor(void *data)
196196
linux_illuminance_sensor_t *linux_open_illuminance_sensor(unsigned rate)
197197
{
198198
RDIR *device = NULL;
199-
linux_illuminance_sensor_t *sensor = malloc(sizeof(*sensor));
199+
linux_illuminance_sensor_t *sensor = (linux_illuminance_sensor_t *)
200+
malloc(sizeof(*sensor));
200201

201202
if (!sensor)
202203
goto error;

libretro-db/c_converter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct dat_converter_bt_node_t
110110
static dat_converter_list_t* dat_converter_list_create(
111111
dat_converter_list_enum type)
112112
{
113-
dat_converter_list_t* list = malloc(sizeof(*list));
113+
dat_converter_list_t* list = (dat_converter_list_t*)malloc(sizeof(*list));
114114

115115
list->type = type;
116116
list->count = 0;

0 commit comments

Comments
 (0)