Menu

#33 Incompatible types error on Mac OS X (Mavericks)

Release_35
closed-fixed
nobody
None
5
2021-06-18
2014-01-09
No

When compiling a project with synapse in lazarus on Mac OS X (I'm using Mavericks, don't know if it also occurs in older versions of the OS), then the following error occurs:

/Developer/lazarus/components/synapse/synaser.pas(1945,54) Error: Incompatible types: got "ShortInt" expected "Pointer"

According to a post from the mailing list, line 1945 in synaser.pas needs to be changed from
SerialCheck(fpioctl(FHandle, TCIOflush, TCIOFLUSH));
to
SerialCheck(fpioctl(FHandle, TCIOflush, Pointer(PtrInt(TCIOFLUSH))));

(The Pointer(PtrInt(...)) cast is already included in the {$ELSE} branch of the {$IFDEF DARWIN} check, but seems to be missing from the darwin branch ;-) ).

The original mailing list post was:
http://sourceforge.net/p/synalist/mailman/message/29961456/

I have applied that change to my synaser.pas and the compiler error disappeared. I've also included a patch in this bug report.

Cheers,
Robert

1 Attachments

Discussion

  • Geby

    Geby - 2021-06-18
    • status: open --> closed-fixed
     
  • Geby

    Geby - 2021-06-18

    Thanks.

     

Log in to post a comment.