mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-05 16:04:45 +00:00
Merge pull request #465 from Interlisp/warning-reductions-clang15-part2
Warning reductions clang15 part2
This commit is contained in:
13
src/asmbbt.c
13
src/asmbbt.c
@@ -23,20 +23,7 @@
|
||||
#include "version.h"
|
||||
|
||||
#include "lispemul.h"
|
||||
#include "lspglob.h"
|
||||
#include "lispmap.h"
|
||||
#include "lsptypes.h"
|
||||
#include "emlglob.h"
|
||||
#include "adr68k.h"
|
||||
#include "address.h"
|
||||
#include "arith.h"
|
||||
#include "stack.h"
|
||||
#include "cell.h"
|
||||
#include "gcdata.h"
|
||||
|
||||
#include "bb.h"
|
||||
#include "bitblt.h"
|
||||
#include "pilotbbt.h"
|
||||
|
||||
void bitblt(DLword *srcbase, DLword *dstbase, int sx, int dx, int w, int h, int srcbpl, int dstbpl,
|
||||
int backwardflg, int src_comp, int op, int gray, int num_gray, int curr_gray_line) {
|
||||
|
||||
@@ -129,10 +129,14 @@ LispPTR cdr(LispPTR datum)
|
||||
Edited by : Naoyuki Mitani
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
/**
|
||||
* Replace car of x with y
|
||||
*
|
||||
* @param x [in,out] LispPTR to object in which car will be replaced.
|
||||
* @param y [in] LispPTR to object that will become new car of x.
|
||||
* @return x, modified, or NIL if x is not a list.
|
||||
*/
|
||||
LispPTR rplaca(LispPTR x, LispPTR y)
|
||||
/* car of x will be smashed */
|
||||
/* y is a newly car object */
|
||||
{
|
||||
ConsCell *x_68k;
|
||||
ConsCell *temp;
|
||||
@@ -182,10 +186,15 @@ LispPTR rplaca(LispPTR x, LispPTR y)
|
||||
static ConsCell *find_cdrable_pair(LispPTR carpart, LispPTR cdrpart); /* below... */
|
||||
static ConsCell *find_close_cell(struct conspage *page, LispPTR oldcell);
|
||||
#endif
|
||||
/**
|
||||
* Replace cdr of x with y
|
||||
*
|
||||
* @param x [in,out] LispPTR to object in which cdr will be replaced.
|
||||
* @param y [in] LispPTR to object that will become new cdr of x.
|
||||
* @return x, modified, or errors if x is not a list.
|
||||
*/
|
||||
|
||||
LispPTR rplacd(LispPTR x, LispPTR y)
|
||||
/* cdr of x will be smashed */
|
||||
/* y is a newly cdr object */
|
||||
{
|
||||
ConsCell *x_68k;
|
||||
ConsCell *temp68k;
|
||||
|
||||
@@ -114,12 +114,10 @@ static void init_conspage(struct conspage *base, unsigned int link)
|
||||
/**********************************************************************/
|
||||
|
||||
struct conspage *next_conspage(void) {
|
||||
extern struct dtd *ListpDTD;
|
||||
|
||||
struct conspage *page1; /* Allocated 1st MDS page */
|
||||
struct conspage *page2; /* Allocated 2nd MDS page */
|
||||
struct conspage *pg, *priorpg;
|
||||
int next, prior;
|
||||
LispPTR next, prior;
|
||||
|
||||
#ifdef NEWCDRCODING
|
||||
/* Allocate 2 conspages and get 1st page base */
|
||||
@@ -292,15 +290,13 @@ static ConsCell *find_free_cons_cell(void) {
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
LispPTR N_OP_cons(int cons_car, int cons_cdr) {
|
||||
extern struct dtd *ListpDTD;
|
||||
|
||||
LispPTR N_OP_cons(LispPTR cons_car, LispPTR cons_cdr) {
|
||||
struct conspage *new_conspage;
|
||||
ConsCell *new_cell;
|
||||
#ifndef NEWCDRCODING
|
||||
ConsCell *temp_cell;
|
||||
#endif
|
||||
int new_page; /* hold the return val of nextconspage ,DL->int */
|
||||
LispPTR new_page; /* hold the return val of nextconspage */
|
||||
|
||||
GCLOOKUP(cons_cdr &= POINTERMASK, ADDREF);
|
||||
GCLOOKUP(cons_car, ADDREF);
|
||||
@@ -430,7 +426,7 @@ LispPTR N_OP_cons(int cons_car, int cons_cdr) {
|
||||
#ifdef NEWCDRCODING
|
||||
if (254 < ((new_page & 0xff) + ((new_cell->cdr_code & 7) << 1)))
|
||||
error("in CONS, cdr code too big.");
|
||||
#endif /* NEWCDROCDING */
|
||||
#endif /* NEWCDRCODING */
|
||||
return (new_page);
|
||||
|
||||
} /* N_OP_cons() end */
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
#include "lispemul.h" // for LispPTR, ConsCell, NIL, POINTERMASK, DLword
|
||||
#include "lspglob.h" // for ListpDTD
|
||||
#include "lsptypes.h" // for dtd, GetDTD, GetTypeNumber, TYPE_ARRAYBLOCK
|
||||
#ifdef DTDDEBUG
|
||||
#include "testtooldefs.h"
|
||||
#endif
|
||||
|
||||
#ifdef NEWCDRCODING
|
||||
#undef CONSPAGE_LAST
|
||||
|
||||
@@ -453,9 +453,7 @@ void keyboardtype(int fd)
|
||||
type = KB_SUN2;
|
||||
else if (strcmp("jle", key) == 0)
|
||||
type = KB_JLE;
|
||||
else if (strcmp("X", key) == 0)
|
||||
type = KB_X;
|
||||
else if (strcmp("x", key) == 0)
|
||||
else if (strcmp("X", key) == 0 || strcmp("x", key) == 0)
|
||||
type = KB_X;
|
||||
else
|
||||
type = KB_SUN3; /* default */
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "lspglob.h"
|
||||
#include "lsptypes.h" // for GetDTD, GetTypeNumber, dtd, Listp, GETWORD
|
||||
#include "stack.h" // for frameex1, fnhead, BF_MARK, FX_MARK, STK_SAFE
|
||||
#include "version.h" // for UNSIGNED, BIGVM
|
||||
|
||||
struct LCIVCacheEntry;
|
||||
struct LCInstance;
|
||||
|
||||
|
||||
@@ -33,9 +33,14 @@
|
||||
#include "arith.h"
|
||||
#include "bitblt.h"
|
||||
#include "lldsp.h"
|
||||
|
||||
#include "bbtsubdefs.h"
|
||||
|
||||
#include "gcarraydefs.h"
|
||||
#include "testtooldefs.h"
|
||||
#include "lsthandldefs.h"
|
||||
#include "car-cdrdefs.h"
|
||||
#include "keyeventdefs.h"
|
||||
|
||||
#define IMIN(x, y) (((x) > (y)) ? (y) : (x))
|
||||
#define IMAX(x, y) (((x) > (y)) ? (x) : (y))
|
||||
|
||||
@@ -94,9 +99,9 @@ LispPTR SLOWBLTCHAR_index;
|
||||
#define FReplaceSmallp(place, val, puntcase) \
|
||||
{ \
|
||||
if ((0 <= (val)) && ((val) <= MAX_SMALL)) \
|
||||
(LispPTR)(place) = (LispPTR)(S_POSITIVE | (val)); \
|
||||
(place) = (LispPTR)(S_POSITIVE | (val)); \
|
||||
else if (MIN_SMALL <= val) \
|
||||
(LispPTR)(place) = (LispPTR)(S_NEGATIVE | (0xffff & (val))); \
|
||||
(place) = (LispPTR)(S_NEGATIVE | (0xffff & (val))); \
|
||||
else { \
|
||||
puntcase; \
|
||||
} \
|
||||
@@ -125,7 +130,7 @@ LispPTR COLORSCREEN_index; /* if it's 0xffffffff, not yet initialized */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
C_slowbltchar(LispPTR *args)
|
||||
void C_slowbltchar(LispPTR *args)
|
||||
{
|
||||
Stream *n_dstream;
|
||||
DISPLAYDATA *n_dd;
|
||||
@@ -210,8 +215,8 @@ C_slowbltchar(LispPTR *args)
|
||||
w = *(DLword *)NativeAligned2FromLAddr(n_dd->ddcharimagewidths + Char8Code(charcode));
|
||||
h = src_h;
|
||||
|
||||
(short)dst_x = (short)curx;
|
||||
(short)dst_y = (short)cury - (short)n_csinfo->CHARSETDESCENT;
|
||||
dst_x = (short)curx;
|
||||
dst_y = (short)cury - (short)n_csinfo->CHARSETDESCENT;
|
||||
|
||||
{ /* clipping */
|
||||
short left, right, bottom, top;
|
||||
|
||||
@@ -94,7 +94,7 @@ void contextsw(DLword fxnum, DLword bytenum, DLword flags)
|
||||
printf("contextsw : %d \n", fxnum);
|
||||
#endif
|
||||
|
||||
if (!(fxnum == SubovFXP)) {
|
||||
if (fxnum != SubovFXP) {
|
||||
/* interrupt disable during executing [special] function
|
||||
invoked by contextsw(\KEYHANDLER,\RESETSTACK,FAULT)
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
#include "unixcommdefs.h" // for Unix_handlecomm
|
||||
#include "uraidextdefs.h" // for Uraid_mess
|
||||
#include "uutilsdefs.h" // for suspend_lisp, check_unix_password, unix_fu...
|
||||
#include "version.h" // for UNSIGNED
|
||||
#include "vmemsavedefs.h" // for lisp_finish, vmem_save0
|
||||
|
||||
extern LispPTR *PENDINGINTERRUPT68k;
|
||||
|
||||
@@ -232,7 +232,7 @@ void VESA_enter(DspInterface dsp)
|
||||
|
||||
TPRINT(("Enter VESA_enter\n"));
|
||||
VESA_setmode(dsp->graphicsmode, TRUE);
|
||||
if (!((VESA_describemode(dsp->graphicsmode) == 0))) {
|
||||
if (VESA_describemode(dsp->graphicsmode) != 0) {
|
||||
_setvideomode(_DEFAULTMODE);
|
||||
_clearscreen(_GCLEARSCREEN);
|
||||
fprintf(stderr, "Can't set VESA mode %o.\n", dsp->graphicsmode);
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <X11/Xlib.h> // for XFlush, XPutImage
|
||||
#include "devif.h" // for (anonymous), MRegion, DspInterface
|
||||
#include "lispemul.h" // for DLword
|
||||
#include "version.h"
|
||||
#include "xbbtdefs.h" // for clipping_Xbitblt
|
||||
#include "xdefs.h" // for XLOCK, XUNLOCK
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "devif.h" // for (anonymous), MRegion, OUTER_SB_WIDTH, Defin...
|
||||
#include "keyboard.h" // for RING, KBEVENT, KB_ALLUP, KEYEVENTSIZE, MAXK...
|
||||
#include "lispemul.h" // for DLword, ATOM_T, LispPTR, NIL, T
|
||||
#include "version.h"
|
||||
#include "xbitmaps.h" // for LISP_CURSOR, default_cursor, horizscroll_cu...
|
||||
#include "xcursordefs.h" // for set_Xcursor, init_Xcursor
|
||||
#include "xdefs.h" // for XLOCK, XUNLOCK
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
#include "version.h"
|
||||
#include "version.h" // for MAIKO_ENABLE_ETHERNET
|
||||
|
||||
#include <X11/Xlib.h> // for XPointer, True, XParseGeometry, XResource...
|
||||
#include <X11/Xresource.h> // for XrmoptionSepArg, XrmGetResource, Xrmoptio...
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <string.h> // for strncpy, strcat, strcpy, strcmp
|
||||
#include <sys/types.h> // for u_char
|
||||
#include <unistd.h> // for access, R_OK
|
||||
#include "version.h" // for MAIKO_ENABLE_ETHERNET
|
||||
#include "xdefs.h" // for WINDOW_NAME
|
||||
#include "xrdoptdefs.h" // for print_Xusage, read_Xoption
|
||||
|
||||
|
||||
Reference in New Issue
Block a user