Am 09.08.25 um 08:20 schrieb Markus Armbruster:

Stefan Weil via <[email protected]> writes:

Compiler warning:

../chardev/baum.c:657:25: warning: comparison between pointer and integer

Use brlapi_fileDescriptor instead of int for brlapi_fd and
BRLAPI_INVALID_FILE_DESCRIPTOR instead of -1.

Signed-off-by: Stefan Weil <[email protected]>
---

This is a rather old patch which I now use since more than two years
to support Braille with QEMU on Windows.

It's a hack (because Windows uses a pointer (64 bit) which is
assigned to an int (32 bit), but it seems to work.
Would a code comment pointing out the hack be useful?


Maybe. Michael, feel free to add such a comment if you take the patch.

Note that there is also a compiler warning for `qemu_set_fd_handler(baum->brlapi_fd, baum_chr_read, NULL, baum)`:

warning: passing argument 1 of ‘qemu_set_fd_handler’ makes integer from pointer without a cast [-Wint-conversion]

That would be a good place for the comment.

Stefan



Reply via email to