Clean up warnings: get conditional compilation right so that a local

function won't be defined unless it is actually used.
Requested by: eivind
This commit is contained in:
Kazutaka YOKOTA 1999-01-12 10:35:58 +00:00
parent 26fd36dffa
commit 90500a9d1a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42564
2 changed files with 22 additions and 12 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: $
* $Id: fb.c,v 1.1 1999/01/09 02:44:49 yokota Exp $
*/
#include "fb.h"
@ -48,17 +48,20 @@
* for the kernel console. The arrays will be increased dynamically
* when necessary.
*/
static video_adapter_t *adp_ini;
static video_switch_t *vidsw_ini;
static struct cdevsw *vidcdevsw_ini;
static video_adapter_t **adapter = &adp_ini;
static int adapters = 1;
static video_adapter_t *adp_ini;
static video_adapter_t **adapter = &adp_ini;
static video_switch_t *vidsw_ini;
video_switch_t **vidsw = &vidsw_ini;
static struct cdevsw **vidcdevsw = &vidcdevsw_ini;
#ifdef FB_INSTALL_CDEV
#define ARRAY_DELTA 4
static struct cdevsw *vidcdevsw_ini;
static struct cdevsw **vidcdevsw = &vidcdevsw_ini;
static void
vid_realloc_array(void)
{
@ -94,6 +97,8 @@ vid_realloc_array(void)
printf("fb: new array size %d\n", adapters);
}
#endif /* FB_INSTALL_CDEV */
/*
* Low-level frame buffer driver functions
* frame buffer subdrivers, such as the VGA driver, call these functions

View File

@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: $
* $Id: kbd.c,v 1.1 1999/01/09 02:44:50 yokota Exp $
*/
#include "kbd.h"
@ -51,17 +51,20 @@
* for the kernel console. The arrays will be increased dynamically
* when necessary.
*/
static keyboard_t *kbd_ini;
static keyboard_switch_t *kbdsw_ini;
static struct cdevsw *kbdcdevsw_ini;
static keyboard_t **keyboard = &kbd_ini;
static int keyboards = 1;
static keyboard_t *kbd_ini;
static keyboard_t **keyboard = &kbd_ini;
static keyboard_switch_t *kbdsw_ini;
keyboard_switch_t **kbdsw = &kbdsw_ini;
static struct cdevsw **kbdcdevsw = &kbdcdevsw_ini;
#ifdef KBD_INSTALL_CDEV
#define ARRAY_DELTA 4
static struct cdevsw *kbdcdevsw_ini;
static struct cdevsw **kbdcdevsw = &kbdcdevsw_ini;
static void
kbd_realloc_array(void)
{
@ -97,6 +100,8 @@ kbd_realloc_array(void)
printf("kbd: new array size %d\n", keyboards);
}
#endif /* KBD_INSTALL_CDEV */
/*
* Low-level keyboard driver functions
* Keyboard subdrivers, such as the AT keyboard driver and the USB keyboard