On 09.08.2025 09:13, Stefan Weil via wrote:
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 <s...@weilnetz.de>
---
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.
Queued to the trivial-patches tree, with the following addition:
diff --git a/chardev/baum.c b/chardev/baum.c
index 5c3587dda5..ad68321504 100644
--- a/chardev/baum.c
+++ b/chardev/baum.c
@@ -665,6 +665,10 @@ static void baum_chr_open(Chardev *chr,
baum->cellCount_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
baum_cellCount_timer_cb, baum);
+ /*
+ * On Windows, brlapi_fd is a pointer, which is being used here
+ * as an integer, but in practice it seems to work
+ */
qemu_set_fd_handler(baum->brlapi_fd, baum_chr_read, NULL, baum);
}
Thanks,
/mjt