comparison libvo/font_load_ft.c @ 17566:f580a7755ac5

Patch by Stefan Huehner / stefan % huehner ! org \ patch replaces '()' for the correct '(void)' in function declarations/prototypes which have no parameters. The '()' syntax tell thats there is a variable list of arguments, so that the compiler cannot check this. The extra CFLAG '-Wstrict-declarations' shows those cases. Comments about a similar patch applied to ffmpeg: That in C++ these mean the same, but in ANSI C the semantics are different; function() is an (obsolete) K&R C style forward declaration, it basically means that the function can have any number and any types of parameters, effectively completely preventing the compiler from doing any sort of type checking. -- Erik Slagter Defining functions with unspecified arguments is allowed but bad. With arguments unspecified the compiler can't report an error/warning if the function is called with incorrect arguments. -- M\ns Rullg\rd
author rathann
date Thu, 09 Feb 2006 14:08:03 +0000
parents 64875f819a02
children ed9950b8200d
comparison
equal deleted inserted replaced
17565:dc65faaadb04 17566:f580a7755ac5
829 mp_msg(MSGT_OSD, MSGL_V, "Unicode font: %d glyphs.\n", i); 829 mp_msg(MSGT_OSD, MSGL_V, "Unicode font: %d glyphs.\n", i);
830 830
831 return i; 831 return i;
832 } 832 }
833 833
834 static font_desc_t* init_font_desc() 834 static font_desc_t* init_font_desc(void)
835 { 835 {
836 font_desc_t *desc; 836 font_desc_t *desc;
837 int i; 837 int i;
838 838
839 desc = malloc(sizeof(font_desc_t)); 839 desc = malloc(sizeof(font_desc_t));
1087 } 1087 }
1088 } 1088 }
1089 return desc; 1089 return desc;
1090 } 1090 }
1091 1091
1092 int init_freetype() 1092 int init_freetype(void)
1093 { 1093 {
1094 int err; 1094 int err;
1095 1095
1096 /* initialize freetype */ 1096 /* initialize freetype */
1097 err = FT_Init_FreeType(&library); 1097 err = FT_Init_FreeType(&library);
1102 mp_msg(MSGT_OSD, MSGL_V, "init_freetype\n"); 1102 mp_msg(MSGT_OSD, MSGL_V, "init_freetype\n");
1103 using_freetype = 1; 1103 using_freetype = 1;
1104 return 0; 1104 return 0;
1105 } 1105 }
1106 1106
1107 int done_freetype() 1107 int done_freetype(void)
1108 { 1108 {
1109 int err; 1109 int err;
1110 1110
1111 if (!using_freetype) 1111 if (!using_freetype)
1112 return 0; 1112 return 0;