1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-19 01:17:36 +00:00

970 Commits

Author SHA1 Message Date
Nick Briggs
2b7228f37e Remove typedefs for function pointers and their uses. Methods which are defined but never used get (void) args until they are implemented. 2023-02-17 17:01:27 -08:00
Nick Briggs
4853f0e3f5 Fix missing prototype adding ttydefs.h, declare tty_baudtosymbol() as static. 2023-02-17 17:01:27 -08:00
Nick Briggs
a1e5e6eecc fix warning: break will never be executed 2023-02-17 17:01:27 -08:00
Nick Briggs
748c52fbaa lispcmp should be declared static 2023-02-17 17:01:27 -08:00
Nick Briggs
6d7b4c1cd2 panicuraid should be declared static 2023-02-17 17:01:27 -08:00
Nick Briggs
80c9c796c5 Address "warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x"
* Update struct DevRec methods to take a "void *" parameter
   since they get called with different xxxInterface records
   depending on whether they are a keyboard, mouse, or display.
   Introduce GenericReturnVoid method implementation for use
   where needed with DevRec methods. (see mouseif.c)

 * Cast functions implementing DevRec methods as appropriate to match
   the method signature.

 * Update struct DspInterfaceRec methods cleardisplay,
   bitblt_to_screen, mouse_invisible, and mouse_visible to declare
   the parameters they require and all return unsigned long results
   (though it's not clear that this is actually the correct type).
   Requires updating dosmouse.c method implementations.

 * Update GenericReturnT and GenericPanic method implementations
   to have the signature required by the method slots they
   are used in.

 * Correct DOS-only section with incorrect arguments to device.exit
   call for the mouse.

 * Use include "dspifdefs.h" for prototypes for GenericReturnXXX method
   implementations.
2023-02-17 17:01:27 -08:00
Nick Briggs
80e40fa942 Fix warning: The left operand of \'==\' is a garbage value 2023-02-17 17:01:27 -08:00
Nick Briggs
38bf60c626 Static analysis suggests (incorrectly) that a reference *srcbase accesses uninitialized memory in grayword.
Correct its misunderstanding by explicitly initializing all elements of grayword[4] to 0.
2023-02-17 17:01:27 -08:00
Nick Briggs
d5acdf7ea4 Static analysis suggests savedS might be used uninitialized (pathlength > 150). It is or-ed into a result, so initialize to 0 2023-02-17 17:01:27 -08:00
Nick Briggs
0ba8380aea Don't reference uninitialized fields in DspInterface when processing window events in no-scroll case.
Initialize variables to suppress "may be uninitialized when used here" warning that couldn't actually happen.
2023-02-17 17:01:27 -08:00
Nick Briggs
8054c62f8a Ensure XImage and XEvent variables are completely initialized 2023-02-17 17:01:27 -08:00
Nick Briggs
ab79048dae fix warning: incompatible function pointer types for file sort functions in dir.c 2023-02-17 17:01:27 -08:00
Nick Briggs
e03782c6b6 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
14c5f9245e fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
c6b7eb7fd7 Fix incorrect prototype 2023-02-17 17:01:27 -08:00
Nick Briggs
3ccc28d16a fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
51cae2af8d fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
f0f33fe587 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
9ab1215fc8 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
a3ba41fba2 fix warning: a function declaration without a prototype is deprecated in all versions of C
make savestr() static and remove it from dlpidefs.h since it is not used outside of dlpi.c
2023-02-17 17:01:27 -08:00
Nick Briggs
39a716ace8 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
bae09d8eba fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
6838c701cc fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
2175364380 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
202db168a9 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
4a82b6c549 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
76cb36993c fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
89a2b73d33 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
523368a710 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
bee3d3334a fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
5f98006d38 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
093b4526ad fix warning: a function declaration without a prototype is deprecated in all versions of C
remove extraneous declaration of dispatch() (now covered by xcdefs.h)
2023-02-17 17:01:27 -08:00
Nick Briggs
f9e8f7ed85 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
d7ab75b1a7 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
d7c294bc0d fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
1cfa67c515 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
434067770a fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
072a493d56 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
b812513696 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
5ee8f49002 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
81d459be16 Substitute include <errno.h> for extern int errno. 2023-02-17 17:01:27 -08:00
Nick Briggs
f7c67a6317 Correct mismatch between Init_XCursor prototype and definition. 2023-02-17 17:01:27 -08:00
Nick Briggs
36355c12fb Add missing include etherdefs.h to ether_common.c 2023-02-17 17:01:27 -08:00
Nick Briggs
47ac0eacc5 Correct prototype/definition misuse of () for (void) on various functions. 2023-02-17 17:01:27 -08:00
Nick Briggs
36a7422ebc Correct malformed connectToHub prototype and definition 2023-02-17 17:01:27 -08:00
Nick Briggs
1dd86ed48c Correct mismatch between DoRing prototype and definition 2023-02-17 17:01:27 -08:00
Nick Briggs
a10bd9b1c3 Remove set but not used variables DisplayMask and LispMask 2023-02-17 17:01:27 -08:00
Nick Briggs
2c83acee31 Add extern for globally defined currentdsp (pointer), add static to curdsp (storage). 2023-02-17 17:01:27 -08:00
Nick Briggs
aa177fa40a Make typedefs for struct xxxRec/xxx clearer. 2023-02-17 17:01:27 -08:00
Nick Briggs
60e13a774d Net reduction of about 150 warnings when compiling with clang 15.0.6
devif.h, mnxdefs.h:
Update MRegion to reflect that width/height are unsigned.
Update ...EventMask fields in XWINDOW section of DspInterfaceRec to match parameter
   type used in XSelectInput() to which they are passed.
Add padding to explicitly align colors field (short among longs)

xbitmaps.h:
Reorder fields in LISP_CURSOR struct to avoid requiring padding for alignment
   constraints, and adjust initialization to match.
Declare cursors static const.
Move Lisp_Icon from xbitmaps.h to xmkicon.c

xinit.c, xinitdefs.h
Replace bound() (xwinmandefs.h) with static inline unsigned ubound() in xinit.c
Change signature of X_init() to use unsigned values for width, height, depth.
Add casts where necessary to avoid implicit signedness conversions.
Add extern declarations for all globals defined in xinit.c

xwinman.c, xwinmandefs.h
Remove bound() from xwinmandefs.h and use static inline unsigned ubound() in xwinman.c
Change signature of lisp_Xconfigure() to use unsigned width and height parameters.
Make GravSize unsigned to match its usage context.
Add casts where necessary to avoid implicit signedness conversions.
Add missing break to correct switch case fall-through warning.

dspif.c
Change LispDisplayRequestedWidth/Height to unsigned to reflect context of use.

xlspwin.c
Eliminate declaration for unused XEvent report.
Move global variable gcv, used only locally, to local variable in the procedures where needed.
Change various variables used in width/height calculation to unsigned to match usage context.
Add casts where necessary to avoid implicit signedness conversions.

xmkicon.c
Move Lisp_Icon from xbitmaps.h to xmkicon.c.
Move global XImage IconImage to local in function where it is required.
Add cast where necessary to avoid implicit signedness conversions.

xrdopt.c
Remove incorrect casts for signedness causing implicit sign conversion warnings.
Add extern declarations for all globals defined in xrdopt.c

xscroll.c
Replace bound() (xwinmandefs.h) with static inline signed sbound() in xscroll.c

initdsp.c, initdspdefs.h
Change signedness of various display variables from int to unsigned.
Change signature of init_display2() to unsigned display_max.
Add extern declarations for some globals defined in initdsp.c

xbbt.c
Add explicit casts for type warnings from MRegion width/height change.
Add explicit casts for type warnings in arguments to XPutImage().
2023-02-17 17:01:27 -08:00