summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-02 03:59:36 +0000
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-02 03:59:36 +0000
commit9d9a15d18572d1450fd8fef495be3629bf85c995 (patch)
treebfbc498db3d3ada10c8cfe64c9381bce66533419 /libvo
parent1ad9af38b5120af85129d3b74834c7ed9690e7f3 (diff)
downloadmpv-9d9a15d18572d1450fd8fef495be3629bf85c995.tar.bz2
mpv-9d9a15d18572d1450fd8fef495be3629bf85c995.tar.xz
rm unnecesary casts from void* - part 2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18883 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/font_load_ft.c14
-rw-r--r--libvo/gl_common.c6
-rw-r--r--libvo/vo_directfb2.c2
-rw-r--r--libvo/vo_gl.c2
-rw-r--r--libvo/vo_macosx.m2
-rw-r--r--libvo/vo_s3fb.c2
-rw-r--r--libvo/vo_xvmc.c2
7 files changed, 15 insertions, 15 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index e1d475f4a8..2dbd06173b 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -618,9 +618,9 @@ static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx
desc->faces[pic_idx] = face;
- desc->pic_a[pic_idx] = (raw_file*)malloc(sizeof(raw_file));
+ desc->pic_a[pic_idx] = malloc(sizeof(raw_file));
if (!desc->pic_a[pic_idx]) return -1;
- desc->pic_b[pic_idx] = (raw_file*)malloc(sizeof(raw_file));
+ desc->pic_b[pic_idx] = malloc(sizeof(raw_file));
if (!desc->pic_b[pic_idx]) return -1;
desc->pic_a[pic_idx]->bmp = NULL;
@@ -628,11 +628,11 @@ static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx
desc->pic_b[pic_idx]->bmp = NULL;
desc->pic_b[pic_idx]->pal = NULL;
- desc->pic_a[pic_idx]->pal = (unsigned char*)malloc(sizeof(unsigned char)*256*3);
+ desc->pic_a[pic_idx]->pal = malloc(sizeof(unsigned char)*256*3);
if (!desc->pic_a[pic_idx]->pal) return -1;
for (i = 0; i<768; ++i) desc->pic_a[pic_idx]->pal[i] = i/3;
- desc->pic_b[pic_idx]->pal = (unsigned char*)malloc(sizeof(unsigned char)*256*3);
+ desc->pic_b[pic_idx]->pal = malloc(sizeof(unsigned char)*256*3);
if (!desc->pic_b[pic_idx]->pal) return -1;
for (i = 0; i<768; ++i) desc->pic_b[pic_idx]->pal[i] = i/3;
@@ -673,13 +673,13 @@ int generate_tables(font_desc_t *desc, double thickness, double radius)
// fprintf(stderr, "o_r = %d\n", desc->tables.o_r);
if (desc->tables.g_r) {
- desc->tables.g = (unsigned*)malloc(desc->tables.g_w * sizeof(unsigned));
- desc->tables.gt2 = (unsigned*)malloc(256 * desc->tables.g_w * sizeof(unsigned));
+ desc->tables.g = malloc(desc->tables.g_w * sizeof(unsigned));
+ desc->tables.gt2 = malloc(256 * desc->tables.g_w * sizeof(unsigned));
if (desc->tables.g==NULL || desc->tables.gt2==NULL) {
return -1;
}
}
- desc->tables.om = (unsigned*)malloc(desc->tables.o_w*desc->tables.o_w * sizeof(unsigned));
+ desc->tables.om = malloc(desc->tables.o_w*desc->tables.o_w * sizeof(unsigned));
desc->tables.omt = malloc(desc->tables.o_size*256);
omtp = desc->tables.omt;
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index e780a72e89..360cad5e49 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -298,7 +298,7 @@ static void getFunctions(void *(*getProcAddress)(const GLubyte *),
char *allexts;
if (!extensions) extensions = "";
if (!ext2) ext2 = "";
- allexts = (char *)malloc(strlen(extensions) + strlen(ext2) + 2);
+ allexts = malloc(strlen(extensions) + strlen(ext2) + 2);
strcpy(allexts, extensions);
strcat(allexts, " ");
strcat(allexts, ext2);
@@ -332,7 +332,7 @@ void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
GLfloat fval = (GLfloat)val / 255.0;
GLfloat border[4] = {fval, fval, fval, fval};
GLenum clrfmt = (fmt == GL_ALPHA) ? GL_ALPHA : GL_LUMINANCE;
- char *init = (char *)malloc(w * h);
+ char *init = malloc(w * h);
memset(init, val, w * h);
glAdjustAlignment(w);
glPixelStorei(GL_UNPACK_ROW_LENGTH, w);
@@ -400,7 +400,7 @@ int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
return 0;
if (w > MAXDIM || h > MAXDIM)
return 0;
- data = (char *)malloc(w * h * 3);
+ data = malloc(w * h * 3);
if (fread(data, w * 3, h, f) != h)
return 0;
glCreateClearTex(target, fmt, filter, w, h, 0);
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index 8c5d462062..efdf81ad43 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -222,7 +222,7 @@ static int preinit(const char *arg)
{
int argc = 2;
char arg0[10] = "mplayer";
- char *arg1 = (char *)malloc(dfb_params.len + 7);
+ char *arg1 = malloc(dfb_params.len + 7);
char* argv[3];
char ** a;
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 0a9fd426d7..443e57f8cd 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -465,7 +465,7 @@ static void create_osd_texture(int x0, int y0, int w, int h,
glCreateClearTex(gl_target, GL_ALPHA, scale_type, sx, sy, 255);
{
int i;
- char *tmp = (char *)malloc(stride * h);
+ char *tmp = malloc(stride * h);
// convert alpha from weird MPlayer scale.
// in-place is not possible since it is reused for future OSDs
for (i = h * stride - 1; i > 0; i--)
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index 4d289772ec..49c2097b2a 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -125,7 +125,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
break;
}
image_bytes = (image_depth + 7) / 8;
- image_data = (unsigned char*)malloc(image_width*image_height*image_bytes);
+ image_data = malloc(image_width*image_height*image_bytes);
if(!shared_buffer)
{
diff --git a/libvo/vo_s3fb.c b/libvo/vo_s3fb.c
index b64cb9ad44..e733ac9d1f 100644
--- a/libvo/vo_s3fb.c
+++ b/libvo/vo_s3fb.c
@@ -105,7 +105,7 @@ int enable() {
if (v)
return 1;
errno = 0;
- v = (vga_t *)malloc(sizeof(vga_t));
+ v = malloc(sizeof(vga_t));
if (v) {
if (ioperm(0x3d4, 2, 1) == 0) {
fd = open("/dev/mem", O_RDWR);
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index bb0995a43d..3f90d678e4 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -779,7 +779,7 @@ static void init_osd_yuv_pal(){
snum = subpicture.num_palette_entries;
seb = subpicture.entry_bytes;
- palette = (char*)malloc(snum*seb);//check fail
+ palette = malloc(snum*seb);//check fail
if(palette == NULL) return;
for(i=0; i<snum; i++){
// 0-black max-white the other are gradients