[MPlayer-dev-eng] [PATCH] more implicit declarations of functions 1/3

Stephen Sheldon sfsheldo at gmail.com
Fri Jul 8 04:26:56 CEST 2011


Today I realized that when you configure with --enable-debug all the
gcc WARNFLAGS are not set, and in particular you do not get 
"-Werror-implicit-function-declaration" errors, like this:

gui/win32/dialogs.c: In function 'display_openfilewindow':
gui/win32/dialogs.c:143:21: error: implicit declaration of function
 uiSetFileName'

Several of these have crept into gui/win32.  There are functions in
interface.c called from dialogs.c and preferences.c, and there are
problems with forward references in preferences.c. 
In an effort to try to keep things in the win32/gui directory,
I created a new header file gui/win32/interface.h, which includes
gui/interface.h and defines the
functions called outside interface.c.  The new header file is the first
patch.  The second patch changes the files in gui/win32 to include it.
The third patch moves functions around in gui/win32/interface.c to avoid
forward references.

Here is the new header file.  I don't know how to do with with an actual
patch.


/*
 * MPlayer GUI for Win32
 * Copyright (C) 2003 Sascha Sommer <saschasommer at freenet.de>
 * Copyright (C) 2006 Erik Augustson <erik_27can at yahoo.com>
 * Copyright (C) 2006 Gianluigi Tiesi <sherpya at netfarm.it>
 *
 * This file is part of MPlayer.
 *
 * MPlayer is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * MPlayer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef MPLAYER_GUI_WIN32_INTERFACE_H
#define MPLAYER_GUI_WIN32_INTERFACE_H

#include "gui/interface.h"

void uiSetFileName (char *, char *, int);
void gaddlist(char ***, const char *);

#endif






More information about the MPlayer-dev-eng mailing list