This seems to work.
--- inkps.c.orig 2023-06-28 14:54:38.000000000 -0700
+++ inkps.c 2023-06-28 16:14:56.000000000 -0700
@@ -241,7 +241,7 @@
fButton1 = TRUE;
- newptlCur.x = (LONG) (SHORT) mp1;
+ newptlCur.x = (SHORT) (LONG) mp1;
newptlCur.y = (LONG) (SHORT) ((LONG) mp1 >> 16);
@@ -289,7 +289,7 @@
case WM_MOUSEMOVE:
if ( fButton1 && fInPath )
{
- newptlCur.x = (LONG) (SHORT) mp1;
+ newptlCur.x = (SHORT) (LONG) mp1;
newptlCur.y = (LONG) (SHORT) ((LONG) mp1 >> 16);
I'm not sure how casts actually work in C but it seems to me to be better to cast to a bigger variable, like SHORT to LONG then the other way where things might get truncated. Or in this case where the pointer is 32 bit, to cast to LONG, which IIRC is 32 bit whereas a SHORT is 16 bit and can't hold the whole pointer and gets truncated, high bits removed I assume.
Looking at the assembler output, my fix has the same assembler output as the original that GCC complained about. Your fix, were the mouse pointer stopped working resulted in somewhat different assembler output, here's the diff (attached) where inkps.new.S is the same as the original but with my patch and inkps.martin.S is your fix that broke the mouse.
Add -S to CFLAGS to get the assembly and change the name of the output if desired