EXEMODE= ${NOBINMODE}
#BINGRP= kmem
#BINMODE= 2555
-WARNS?= 0
.if !defined(NO_X) && exists(${XINCDIR}/X11/X.h) && exists(${XLIBDIR}/libX11.a)
CFLAGS+= -I${XINCDIR}
ParseBuffer(char *obuf, char **av, int mac)
{
static char *_buf;
- char *buf;
+ char *buf = NULL;
static int buflen = 0;
int len;
static unsigned char
cmos_inb(int portnum)
{
- unsigned char ret_val;
+ unsigned char ret_val = 0;
int cmos_reg;
struct timezone tz;
- struct tm tm;
+ struct tm tm = { .tm_sec = 0 };
time_t now;
switch (portnum) {
int year;
int time00;
struct timezone tz;
- struct tm tm;
+ struct tm tm = { .tm_sec = 0 };
time_t now;
switch (portnum) {
define_output_port_handler(p++, outb_port);
}
} else if (!strcasecmp(av[0], "setver")) {
- int v;
+ int v = 0;
if (ac != 3 || !(v = strtol(av[2], 0, 0))) {
fprintf(stderr, "Usage: setver command version\n");
quit(1);
{
fsstat_t fs;
int error;
- int drive;
+ int drive = 0;
/* work out drive */
switch (R_AH) {
int error;
char fname[PATH_MAX];
struct stat sb;
- int mode,action,status;
- char *pname;
+ int mode = 0, action = 0, status;
+ char *pname = NULL;
int drive;
int fd;
{
find_block_t *dta;
dosdir_t dosdir;
- int error;
+ int error = 0;
dta = (find_block_t *)VECPTR(disk_transfer_addr);
case MOVE_MEMORY_REGION:
{
EMSmovemem *emvp;
- u_long src_addr, dst_addr;
- u_short src_handle, dst_handle;
+ u_long src_addr = 0, dst_addr = 0;
+ u_short src_handle = 0, dst_handle = 0;
if (R_AL == EXCHANGE)
debug(D_EMS, "EMS: Exchange memory region ");
int biggest;
int envseg;
char *psp;
- int text_size;
+ int text_size = 0;
int i;
int start_segment;
int exe_file;
{
int disp;
int havesib;
- int base;
- int idx;
- int scale;
+ int base = 0;
+ int idx = 0;
+ int scale = 0;
int havebase;
/* skip mod/rm byte */
}
static unsigned char
-irqc_in(int port)
+irqc_in(int port __unused)
{
return 0x60; /* What should be here? */
}
static void
-irqc_out(int port, unsigned char val)
+irqc_out(int port __unused, unsigned char val)
{
if (val == 0x20)
send_eoi();
}
static unsigned char
-imr_in(int port)
+imr_in(int port __unused)
{
return IM;
}
static void
-imr_out(int port, unsigned char val)
+imr_out(int port __unused, unsigned char val)
{
IM = val;
resume_interrupt();
init_hdisk(int drive, int cyl, int head, int tracksize, char *file, char *fake_ptab)
{
struct diskinfo *di;
- u_long table;
+ u_long table = 0;
if (drive < 0) {
for (drive = 2; drive < 26; ++drive) {
init_floppy(int drive, int type, char *file)
{
struct diskinfo *di = floppyinfo;
- u_long table;
+ u_long table = 0;
struct stat sb;
while (di->type >= 0 && di->type != type && disize(di)/2 != type)
}
static void
-com_async(int fd, int cond, void *arg, regcontext_t *REGS)
+com_async(int fd __unused, int cond, void *arg, regcontext_t *REGS __unused)
{
struct com_data_struct *cdsp = (struct com_data_struct*) arg;
{
struct stat stat_buf;
int mode = 0; /* read | write */
- int reg_num, ret_val, spd, speed;
+ int reg_num, ret_val, spd = 0, speed = 0;
u_int8_t div_hi, div_lo;
debug(D_PORT, "com_set_line: cdsp = %8p, port = 0x%04x,"
unsigned char
com_port_in(int port)
{
- struct com_data_struct *cdsp;
- unsigned char rs;
+ struct com_data_struct *cdsp = NULL;
+ unsigned char rs = 0;
unsigned char i;
int r;
void
com_port_out(int port, unsigned char val)
{
- struct com_data_struct *cdsp;
+ struct com_data_struct *cdsp = NULL;
int i;
/* search for a valid COM ???or MOUSE??? port */
int fd;
char *addr;
int nbytes;
- int n;
+ int n = 0;
fd = r_sft->fd;
if (lseek(fd, r_sft->offset, SEEK_SET) < 0)
char fname[PATH_MAX];
struct stat sb;
int error;
- int mode; /* open mode */
+ int mode = 0; /* open mode */
int attr; /* attributes of created file */
- int action; /* what to do about file */
+ int action = 0; /* what to do about file */
u_char *p, *e;
int i;
- int omode; /* mode to say we opened in */
+ int omode = 0; /* mode to say we opened in */
int status;
int fd;
void
int33(regcontext_t *REGS)
{
- u_long vec;
+ u_long vec = 0;
u_short mask;
int i;
};
void
-debug_event(int fd, int cond, void *arg, regcontext_t *REGS)
+debug_event(int fd __unused, int cond, void *arg __unused, regcontext_t *REGS)
{
static char ibuf[1024];
static int icnt = 0;
}
void
-kbd_event(int fd, int cond, void *arg, regcontext_t *REGS)
+kbd_event(int fd, int cond, void *arg __unused, regcontext_t *REGS __unused)
{
if (!(cond & AS_RD))
return;
}
void
-video_async_event(int fd, int cond, void *arg, regcontext_t *REGS)
+video_async_event(int fd, int cond, void *arg __unused,
+ regcontext_t *REGS __unused)
{
#ifndef NO_X
int int9 = 0;
int
tty_peek(REGISTERS, int flag)
{
- int c;
+ int c = 0;
if (c == nextchar)
return(nextchar & 0xff);