1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-16 00:04:59 +00:00

Fix unused variable warnings. (#173)

This commit is contained in:
Bruce Mitchener 2021-01-04 12:58:16 +07:00 committed by GitHub
parent 9373f4ebbe
commit a481057fbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 56 additions and 45 deletions

View File

@ -930,7 +930,10 @@ LispPTR bitshade_bitmap(LispPTR *args) {
int right, top, destbits, left, bottom;
LispPTR operation, texture;
DLword *srcbase, *dstbase, *base;
int dty, slx, dstbpl, op, src_comp, displayflg = 0;
int dty, slx, dstbpl, op, src_comp;
#ifdef REALCURSOR
int displayflg = 0;
#endif
int rasterwidth;
int num_gray, curr_gray_line;
DLword grayword[4];
@ -1171,12 +1174,16 @@ void bltchar(LispPTR *args)
register PILOTBBT *pbt;
register DISPLAYDATA *dspdata;
int base;
#ifdef REALCURSOR
register int displayflg;
#endif
int w, h;
int backwardflg = 0, sx, dx, srcbpl, dstbpl, src_comp, op;
DLword *srcbase, *dstbase;
int gray = 0, num_gray = 0, curr_gray_line = 0;
int gray = 0;
#ifdef NEWBITBLT
int num_gray = 0, curr_gray_line = 0;
#endif
pbt = (PILOTBBT *)Addr68k_from_LADDR(((BLTC *)args)->pilotbbt);
dspdata = (DISPLAYDATA *)Addr68k_from_LADDR(((BLTC *)args)->displaydata);
@ -1453,10 +1460,15 @@ void newbltchar(LispPTR *args) {
int lmargin, rmargin, xoff;
int base;
int h, w;
#ifdef REALCURSOR
int displayflg;
#endif
int backwardflg = 0, sx, dx, srcbpl, dstbpl, src_comp, op;
DLword *srcbase, *dstbase;
int gray = 0, num_gray = 0, curr_gray_line = 0;
int gray = 0;
#ifdef NEWBITBLT
int num_gray = 0, curr_gray_line = 0;
#endif
displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(((BLTARG *)args)->displaydata);
@ -1918,7 +1930,6 @@ void ccfuncall(register unsigned int atom_index, register int argnum, register i
register short pv_num; /* scratch for pv */
register struct fnhead *tmp_fn;
int rest; /* use for arignments */
int closurep = NIL;
/* Get Next Block offset from argnum */
CURRENTFX->nextblock = (LADDR_from_68k(CurrentStackPTR) & 0x0ffff) - (argnum << 1) + 4 /* +3 */;
@ -2019,7 +2030,10 @@ void tedit_bltchar(LispPTR *args)
int h, w;
int sx, dx, srcbpl, dstbpl, src_comp, op;
DLword *srcbase, *dstbase;
int gray = 0, num_gray = 0, curr_gray_line = 0;
int gray = 0;
#ifdef NEWBITBLT
int num_gray = 0, curr_gray_line = 0;
#endif
displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(((TBLTARG *)args)->displaydata);
if (displaydata68k->ddcharset != ((TBLTARG *)args)->charset) {

View File

@ -71,7 +71,9 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
{
PILOTBBT *pbt;
DLword *srcbase, *dstbase;
#if defined(SUNDISPLAY) || defined(DOS)
int displayflg;
#endif
int sx, dx, w, h, srcbpl, dstbpl, backwardflg;
int src_comp, op, gray, num_gray, curr_gray_line;

View File

@ -298,7 +298,10 @@ LispPTR N_OP_cons(register int cons_car, register int cons_cdr) {
extern struct dtd *ListpDTD;
register struct conspage *new_conspage;
register ConsCell *new_cell, *temp_cell;
register ConsCell *new_cell;
#ifndef NEWCDRCODING
register ConsCell *temp_cell;
#endif
register int new_page; /* hold the return val of nextconspage ,DL->int */
GCLOOKUP(cons_cdr &= POINTERMASK, ADDREF);

View File

@ -988,7 +988,7 @@ static int enum_ufs_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
register FINFO *nextp;
int n, len, rval;
struct find_t dirp;
register struct passwd *pwd;
/* register struct passwd *pwd; -- From author support */
struct stat sbuf;
char namebuf[MAXPATHLEN];
@ -1075,7 +1075,7 @@ static int enum_ufs_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
int n, rval;
size_t len;
DIR *dirp;
register struct passwd *pwd;
/* register struct passwd *pwd; -- From author support */
struct stat sbuf;
char namebuf[MAXPATHLEN];
@ -2028,7 +2028,10 @@ typedef struct ufsgfs {
LispPTR COM_gen_files(register LispPTR *args)
{
char fbuf[MAXPATHLEN + 5], dir[MAXPATHLEN], pattern[MAXPATHLEN];
char host[MAXNAMLEN], name[MAXNAMLEN], ver[VERSIONLEN], drive[1];
char host[MAXNAMLEN], name[MAXNAMLEN], ver[VERSIONLEN];
#ifdef DOS
char drive[1];
#endif
int dskp, count, highestp, propp, fid, version;
register char *cp;
FINFO *fp;

View File

@ -302,7 +302,10 @@ int N_OP_drawline(LispPTR ptr, int curbit, int xsize, int width, int ysize, int
(start_addr < DisplayRegion68k_end_addr) &&
((int)(temp_e = (DLword *)(dataptr - DisplayRegion68k)) >= 0) &&
((DLword *)dataptr < DisplayRegion68k_end_addr)) {
int start_x, start_y, end_x, end_y, w, h, displayflg;
int start_x, start_y, end_x, end_y, w, h;
#if defined(SUNDISPLAY) && defined(OLD_CURSOR)
int displayflg;
#endif
start_y = (int)temp_s / DisplayRasterWidth;
start_x = ((int)temp_s % DisplayRasterWidth) * BITSPER_DLWORD;

View File

@ -100,7 +100,9 @@ void DSP_Cursor(LispPTR *args, int argnum)
extern int ScreenLocked;
extern DLword *EmCursorX68K, *EmCursorY68K;
extern int LastCursorX, LastCursorY;
#if !defined(OLD_CURSOR)
static int Init = T;
#endif
#ifdef SUNDISPLAY
if (argnum == 2) {

View File

@ -155,8 +155,6 @@ LispPTR N_OP_fquotient(LispPTR parg1, LispPTR parg2) {
LispPTR N_OP_fgreaterp(LispPTR parg1, LispPTR parg2) {
REGISTER float arg1, arg2;
register DLword *wordp;
register LispPTR lptr;
N_MakeFloat(parg1, arg1, parg2);
N_MakeFloat(parg2, arg2, parg2);

View File

@ -188,7 +188,7 @@ LispPTR map_code_pointers(LispPTR codeblock, short int casep) {
LispPTR remimplicitkeyhash(LispPTR item, LispPTR ik_hash_table) {
Ikhashtbl *ik_htable;
LispPTR reprobe, bits, limits, index, base, value, key_accessor;
LispPTR reprobe, bits, limits, index, base, value;
ik_htable = (Ikhashtbl *)Addr68k_from_LADDR(ik_hash_table);
bits = Hashingbits(item);
limits = ik_htable->last_index;

View File

@ -516,8 +516,8 @@ LispPTR reclaimstackp(LispPTR ptr) /* This is the entry function */
void printarrayblock(LispPTR base) {
struct arrayblock *bbase, *btrailer, *ptrailer;
struct arrayblock *bfwd, *bbwd, *rbase;
LispPTR *addr, *tmprover;
struct arrayblock *bfwd, *bbwd;
LispPTR *addr;
LispPTR pbase, nbase;

View File

@ -257,7 +257,6 @@ void enter_big_reference_count(LispPTR ptr) {
void modify_big_reference_count(LispPTR *entry, DLword casep, LispPTR ptr) {
struct gc_ovfl *oventry;
LispPTR tmp;
int tmpcnt;
/* ditto comment in entry_big_reference_count */
if (ptr & 1) ptr &= 0xfffffffe;
@ -312,7 +311,6 @@ void modify_big_reference_count(LispPTR *entry, DLword casep, LispPTR ptr) {
LispPTR htfind(LispPTR ptr, int casep) {
register GCENTRY *entry, *link, *prev;
register GCENTRY entry_contents, hiptr;
register struct htlinkptr *htlptr;
/* if the NOREF bit is on in the type table entry, do
not reference count this pointer. Used for non-reference
@ -434,7 +432,6 @@ nolink: /* no match */
LispPTR rec_htfind(LispPTR ptr, int casep) {
register GCENTRY *entry, *link, *prev;
register GCENTRY entry_contents, hiptr;
register struct htlinkptr *htlptr;
/* if the NOREF bit is on in the type table entry, do
not reference count this pointer. Used for non-reference

View File

@ -350,7 +350,6 @@ LispPTR gcmapunscan(void) {
register GCENTRY probe;
register GCENTRY *entry;
GCENTRY offset;
register LispPTR ptr;
probe = HTMAIN_ENTRY_COUNT;
while ((probe = gcscan2(probe)) != NIL) {
@ -394,7 +393,6 @@ LispPTR gcscanstack(void) {
LispPTR scanptr, scanend;
UNSIGNED scanend68K;
int ftyp;
int pvcount;
scanptr = VAG2(STK_HI, InterfacePage->stackbase);
scanend = VAG2(STK_HI, InterfacePage->endofstack);

View File

@ -127,7 +127,6 @@ void dogc01(void) {
/*!!!!!! should update clock in Miscstats */
void doreclaim(void) {
int gctm1;
MISCSTATS gcmisc;
if (*GcDisabled_word == NIL) {

View File

@ -123,8 +123,6 @@ LispPTR gcreccell(LispPTR cell) {
LispPTR ptrfield, carfield;
int index, code;
LispPTR *field;
int freecnt;
LispPTR freeptr;
#ifdef NEWCDRCODING
LispPTR to_do[TODO_LIMIT]; /* table of pointers to follow, since Cdr coding lost */

View File

@ -436,7 +436,9 @@ void init_for_keyhandle(void) {
/************************************************************************/
void init_for_bltchar(void) {
#ifdef COLOR
LispPTR index;
#endif
char *IL;
extern LispPTR *TOPWDS68k;
@ -479,9 +481,6 @@ void init_for_bltchar(void) {
/************************************************************************/
void init_for_bitblt(void) {
LispPTR index;
char *IL;
extern LispPTR BITBLTBITMAP_index;
extern LispPTR BLTSHADEBITMAP_index;
#ifdef COLOR

View File

@ -152,8 +152,6 @@ void lineBlt8(DLword *srcbase, register int offset, register u_char *destl, regi
extern DLword PAINT_atom;
extern DLword ERASE_atom;
DLword *baseword; /* Assume dest word always quad aligned */
if (sourcetype == INVERT_atom) {
register int tempcol;
tempcol = color0;

View File

@ -66,8 +66,8 @@ extern DLword *Lisp_world;
DLword compute_hash(char *char_base, DLword offset, DLword length) {
DLword hash;
DLword number;
DLword temp1, temp2;
DLword *word_base;
DLword temp1;
char_base += offset;
hash = (int)(*(char_base)) << 8; /* get first byte */
char_base++; /* skip length area */
@ -97,7 +97,7 @@ DLword compute_hash(char *char_base, DLword offset, DLword length) {
DLword compute_lisp_hash(char *char_base, DLword offset, DLword length, DLword fatp) {
DLword hash;
DLword number;
DLword temp1, temp2;
DLword temp1;
DLword *word_base;
if (length == 0) return (0);

View File

@ -139,7 +139,6 @@ int find_process_slot(register int pid)
void wait_for_comm_processes(void) {
int pid;
int slot;
int res;
unsigned char d[5];
d[0] = 'W';
@ -285,7 +284,6 @@ int FindUnixPipes(void) {
int FindAvailablePty(char *Master, char *Slave) {
int res;
char *let, *num;
res = posix_openpt(O_RDWR);
if (res < 0) {
@ -346,9 +344,8 @@ int FindAvailablePty(char *Master, char *Slave) {
/************************************************************************/
LispPTR Unix_handlecomm(LispPTR *args) {
int command, c, dest, PID, i, slot, sock, res;
LispPTR retval;
unsigned char d[4], b[1];
int command, dest, i, slot, sock;
unsigned char d[4];
unsigned char ch;
unsigned char buf[1];
@ -359,8 +356,8 @@ LispPTR Unix_handlecomm(LispPTR *args) {
switch (command) {
case 0: /* Fork pipe process */
{
char *UpPipeName, *DownPipeName, *PipeName;
int slot, PipeFD, sockFD;
char *PipeName;
int PipeFD, sockFD;
/* First create the socket */
struct sockaddr_un sock;

View File

@ -82,13 +82,12 @@ loop:
int ForkUnixShell(int slot, char *PtySlave, char *termtype, char *shellarg)
{
int res, PID, SlaveFD;
int PID, SlaveFD;
struct termios tio;
PID = fork();
if (PID == 0) {
char envstring[64];
char *argvec[4];
if (0 > setsid()) /* create us a new session for tty purposes */

View File

@ -319,7 +319,9 @@ LispPTR vmem_save(char *sysout_file_name)
register int i;
char tempname[MAXPATHLEN];
register int rval;
DLword *bmptr;
#ifdef SUNDISPLAY
/* DLword *bmptr; */
#endif
#ifndef DOS
extern int ScreenLocked;
extern DLword *EmCursorX68K;

View File

@ -234,7 +234,6 @@ void dispatch(void) {
int fn_opcode_size;
int fn_num_args;
int fn_apply;
LispPTR fn_loc_defcell;
RET;
CLR_IRQ;
@ -1415,8 +1414,8 @@ check_interrupt:
cause_interruptcall(DORECLAIM_index);
} else if (*PENDINGINTERRUPT68k != NIL) {
INTSTAT2 *intstate = ((INTSTAT2 *)Addr68k_from_LADDR(*INTERRUPTSTATE_word));
unsigned char newints = (intstate->pendingmask) & ~(intstate->handledmask);
/* if (newints) */
/*unsigned char newints = (intstate->pendingmask) & ~(intstate->handledmask);
if (newints) */
{
intstate->handledmask |= intstate->pendingmask;
*PENDINGINTERRUPT68k = NIL;