Add missing 'void' keyword to parameterless function declarations.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28267 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2009-01-05 14:48:03 +00:00
parent 24617c7318
commit 824abb5a65
27 changed files with 94 additions and 84 deletions

View File

@ -7,6 +7,8 @@
tested it.
*/
/* According to Uoti this code is broken. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -28,8 +30,8 @@ static mga_vid_config_t mga_vid_config;
static unsigned char* frame=NULL;
static int f;
static int mga_init(){
static int mga_init(void)
{
f = open("/dev/mga_vid",O_RDWR);
if(f == -1)
{
@ -74,7 +76,8 @@ static int mga_init(){
#endif
// Returns current time in microseconds
static unsigned int GetTimer(){
static unsigned int GetTimer(void)
{
struct timeval tv;
struct timezone tz;
// float s;

View File

@ -44,7 +44,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -100,7 +100,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -115,11 +115,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -44,7 +44,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -100,7 +100,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -115,11 +115,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -56,7 +56,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -147,7 +147,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -162,11 +162,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -48,7 +48,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -124,7 +124,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -139,11 +139,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -48,7 +48,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -124,7 +124,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -139,11 +139,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -50,7 +50,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -96,7 +96,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -111,11 +111,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -55,7 +55,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -146,7 +146,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -161,11 +161,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -58,7 +58,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -175,7 +175,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -190,11 +190,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -73,7 +73,7 @@ int b_dlOpened=0;
void *handle=NULL;
/* exits program when failure */
void loadSyms() {
void loadSyms(void) {
fputs("loadSyms()\n", stderr);
if (!b_dlOpened) {
char *error;
@ -169,7 +169,7 @@ void loadSyms() {
}
}
void closeDll() {
void closeDll(void) {
if (handle) {
b_dlOpened=0;
dlclose(handle);
@ -184,11 +184,11 @@ void _init(void) {
struct timezone tz;
struct timeval tv1, tv2;
void tic() {
void tic(void) {
gettimeofday(&tv1, &tz);
}
void toc() {
void toc(void) {
long secs, usecs;
gettimeofday(&tv2, &tz);
secs=tv2.tv_sec-tv1.tv_sec;

View File

@ -182,8 +182,8 @@ static int old_video_driver = 0;
void ShowDXR3Config( void );
void HideDXR3Config( void );
#endif
void ShowAudioConfig();
void HideAudioConfig();
void ShowAudioConfig( void );
void HideAudioConfig( void );
static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data );
static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
@ -1499,7 +1499,7 @@ static GtkWidget *CBAudioMixerChannel;
static GtkWidget *BAudioOk;
static GtkWidget *BAudioCancel;
void ShowAudioConfig() {
void ShowAudioConfig( void ) {
if (AudioConfig) gtkActive(AudioConfig);
else AudioConfig = create_AudioConfig();
@ -1532,7 +1532,7 @@ void ShowAudioConfig() {
gtkSetLayer(AudioConfig);
}
void HideAudioConfig() {
void HideAudioConfig( void ) {
if (!AudioConfig) return;
gtk_widget_hide(AudioConfig);
gtk_widget_destroy(AudioConfig);
@ -1580,7 +1580,7 @@ static void audioButton(GtkButton *button, gpointer user_data) {
}
}
GtkWidget *create_AudioConfig() {
GtkWidget *create_AudioConfig( void ) {
GList *items = NULL;
GtkWidget *vbox;
GtkWidget *table;

View File

@ -166,11 +166,11 @@ static InputPlugin* input_plugins[100];
static int no_plugins=0;
/* Dummy functions */
static InputVisType input_get_vis_type(){return 0;}
static InputVisType input_get_vis_type(void){return 0;}
static void input_add_vis_pcm(int time, AFormat fmt, int nch, int length,
void *ptr){}
static void input_set_info_text(char * text){}
char *xmms_get_gentitle_format(){ return ""; }
char *xmms_get_gentitle_format(void){ return ""; }
/* Dummy functions END*/
static void input_set_info(char* title,int length, int rate, int freq, int nch)
@ -212,7 +212,7 @@ static void init_plugins_from_dir(const char *plugin_dir){
closedir(dir);
}
static void init_plugins(){
static void init_plugins(void) {
char *home;
no_plugins=0;
@ -227,7 +227,7 @@ static void init_plugins(){
init_plugins_from_dir(XMMS_INPUT_PLUGIN_DIR);
}
static void cleanup_plugins(){
static void cleanup_plugins(void) {
while(no_plugins>0){
--no_plugins;
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_XMMS_ClosingPlugin,

View File

@ -1522,7 +1522,7 @@ void releaseGlContext(int *vinfo, HGLRC *context) {
*context = 0;
}
void swapGlBuffers() {
void swapGlBuffers(void) {
HDC vo_hdc = GetDC(vo_w32_window);
SwapBuffers(vo_hdc);
ReleaseDC(vo_w32_window, vo_hdc);

View File

@ -208,7 +208,7 @@ query_format(uint32_t format)
}
#ifndef VO_XMGA
static void mga_fullscreen()
static void mga_fullscreen(void)
{
uint32_t w,h;
if ( !vo_fs ) {

View File

@ -244,7 +244,7 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
}
// we do not draw osd.
void draw_osd() {}
void draw_osd(void) {}
// we do not handle events.
static void check_events(void) {}

View File

@ -71,7 +71,7 @@ static uint32_t in_width, in_height, in_format, in_depth, in_s3_format,
static char *inpage, *inpage0, *smem = NULL;
static void (*alpha_func)();
static void clear_screen();
static void clear_screen(void);
/* streams registers */
#define PSTREAM_CONTROL_REG 0x8180
@ -116,7 +116,7 @@ void writecrtc(int reg, int value) {
}
// enable S3 registers
int enable() {
int enable(void) {
int fd;
if (v)
@ -148,7 +148,7 @@ int enable() {
return 0;
}
void disable() {
void disable(void) {
if (v) {
writecrtc(0x53, v->cr53);
writecrtc(0x39, v->cr39);
@ -227,7 +227,7 @@ int yuv_on(int format, int src_w, int src_h, int dst_x, int dst_y, int dst_w, in
return offset;
}
void yuv_off() {
void yuv_off(void) {
writecrtc(0x67, readcrtc(0x67) & ~0xc);
memset(v->mmio + 0x8180, 0, 0x80);
OUTREG(0x81b8, 0x900);
@ -328,7 +328,7 @@ static void uninit(void)
}
}
static void clear_screen()
static void clear_screen(void)
{
if (inpage0) {
int n;

View File

@ -117,8 +117,8 @@ static const struct{
static void xvmc_free(void);
static void xvmc_clean_surfaces(void);
static int count_free_surfaces();
static struct xvmc_render_state * find_free_surface();
static int count_free_surfaces(void);
static struct xvmc_render_state * find_free_surface(void);
static const vo_info_t info = {
"XVideo Motion Compensation",
@ -175,7 +175,7 @@ static void allocate_xvimage(int xvimage_width,int xvimage_height,int xv_format)
return;
}
static void deallocate_xvimage()
static void deallocate_xvimage(void)
{
#ifdef HAVE_SHM
if ( Shmem_Flag )
@ -699,7 +699,7 @@ static int draw_frame(uint8_t *srcp[]){
assert(0);
}
static void init_osd_yuv_pal(){
static void init_osd_yuv_pal(void) {
char * palette;
int rez;
int i,j;
@ -745,7 +745,7 @@ int rez;
printf("vo_xvmc: XvMCClearSubpicture failed!\n");
}
static void OSD_init(){
static void OSD_init(void) {
unsigned short osd_height, osd_width;
int rez;
@ -1201,7 +1201,7 @@ int stat;
src_rndr->state &= ~MP_XVMC_STATE_OSD_SOURCE;
}
}
static int count_free_surfaces(){
static int count_free_surfaces(void) {
int i,num;
num=0;
for(i=0; i<number_of_surfaces; i++){
@ -1212,7 +1212,7 @@ int i,num;
return num;
}
static struct xvmc_render_state * find_free_surface(){
static struct xvmc_render_state * find_free_surface(void) {
int i,t;
int stat;
struct xvmc_render_state * visible_rndr;

View File

@ -135,7 +135,7 @@ static uint32_t pfb_colorkey;
void pfb_overlay_on() {
void pfb_overlay_on(void) {
int h_inc, h_step, ecp_div;
pfb_vregs[PFB_CLOCK_CNTL_INDEX] = (pfb_vregs[PFB_CLOCK_CNTL_INDEX] & ~0x0000003f) | 0x00000008;
@ -192,11 +192,11 @@ void pfb_overlay_on() {
pfb_vregs[PFB_OV0_AUTO_FLIP_CNTL] = PFB_OV0_AUTO_FLIP_BUF0;
}
void pfb_overlay_off() {
void pfb_overlay_off(void) {
pfb_vregs[PFB_OV0_SCALE_CNTL] = 0;
}
void center_overlay() {
void center_overlay(void) {
if (pfb_xres > pfb_dstwidth) {
pfb_wx0 = (pfb_xres - pfb_dstwidth) / 2;
pfb_wx1 = pfb_wx0 + pfb_dstwidth;
@ -321,7 +321,7 @@ static void uninit(void)
munmap(pfb_vregs, PFB_REGS_MMAPLEN);
}
static uint32_t pfb_fullscreen() {
static uint32_t pfb_fullscreen(void) {
if (!pfb_fs) {
aspect(&pfb_dstwidth,&pfb_dstheight, A_ZOOM);
pfb_fs = 1;

View File

@ -17,7 +17,7 @@ typedef uint32_t fourcc_t;
typedef struct FatalError
{
FatalError();
void PrintAll() {}
void PrintAll(void) {}
}FatalError;
*/

View File

@ -496,7 +496,7 @@ void MP3_Init(void){
#if 0
void MP3_Close(){
void MP3_Close(void){
MP3_eof=1;
if(mp3_file) fclose(mp3_file);
mp3_file=NULL;
@ -565,7 +565,7 @@ void MP3_PrintHeader(void){
#include "genre.h"
// Read & print ID3 TAG. Do not call when playing!!! returns filesize.
int MP3_PrintTAG(){
int MP3_PrintTAG(void){
struct id3tag {
char tag[3];
char title[30];

View File

@ -11,7 +11,7 @@
#include "mp3lib/mp3.h"
#include "cpudetect.h"
static inline unsigned int GetTimer(){
static inline unsigned int GetTimer(void){
struct timeval tv;
struct timezone tz;
// float s;

View File

@ -29,7 +29,7 @@ int screen_width=80;
int screen_height=24;
char * erase_to_end_of_line = NULL;
void get_screen_size(){
void get_screen_size(void){
}
static HANDLE stdin;
@ -126,7 +126,8 @@ void getch2(void)
mplayer_put_key(r);
}
void getch2_enable(){
void getch2_enable(void)
{
DWORD retval;
stdin = GetStdHandle(STD_INPUT_HANDLE);
if(!GetNumberOfConsoleInputEvents(stdin,&retval))
@ -137,7 +138,8 @@ void getch2_enable(){
else getch2_status=1;
}
void getch2_disable(){
void getch2_disable(void)
{
if(!getch2_status) return; // already disabled / never enabled
getch2_status=0;
}

View File

@ -7,12 +7,14 @@
const char *timer_name = "Windows native";
// Returns current time in microseconds
unsigned int GetTimer(){
unsigned int GetTimer(void)
{
return timeGetTime() * 1000;
}
// Returns current time in milliseconds
unsigned int GetTimerMS(){
unsigned int GetTimerMS(voi)
{
return timeGetTime() ;
}
@ -27,7 +29,8 @@ int usec_sleep(int usec_delay){
static DWORD RelativeTime = 0;
float GetRelativeTime(){
float GetRelativeTime(void)
{
DWORD t, r;
t = GetTimer();
r = t - RelativeTime;
@ -35,6 +38,7 @@ float GetRelativeTime(){
return (float) r *0.000001F;
}
void InitTimer(){
void InitTimer(void)
{
GetRelativeTime();
}

View File

@ -20,7 +20,7 @@
*******************************************************************************************************************/
cd_info_t*
cd_info_new() {
cd_info_new(void) {
cd_info_t *cd_info = NULL;
cd_info = malloc(sizeof(cd_info_t));

View File

@ -566,7 +566,8 @@ if(!restore){
}
#ifdef MGA_ALLOW_IRQ
static void enable_irq(){
static void enable_irq(void)
{
long int cc;
cc = readl(mga_mmio_base + IEN);
@ -582,7 +583,7 @@ static void enable_irq(){
return;
}
static void disable_irq()
static void disable_irq(void)
{
writeb( 0x11, mga_mmio_base + CRTCX);
writeb(0x20, mga_mmio_base + CRTCD ); /* clear 0, enable off */

View File

@ -45,7 +45,7 @@
static HFILE mapdev = -1;
static ULONG stored_virt_addr;
static char* mappath = "\\DEV\\PMAP$";
static HFILE open_mmap()
static HFILE open_mmap(void)
{
APIRET rc;
ULONG action;
@ -62,7 +62,7 @@ static HFILE open_mmap()
return mapdev;
}
static void close_mmap()
static void close_mmap(void)
{
if (mapdev != -1)
DosClose(mapdev);

View File

@ -33,7 +33,7 @@ typedef struct MapDevRequest
#define METHOD_NEITHER 3
int IsWinNT(){
int IsWinNT(void) {
OSVERSIONINFO OSVersionInfo;
OSVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&OSVersionInfo);