Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkcgen <kcgen@users.noreply.github.com>2022-10-22 23:33:24 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2022-10-23 16:33:07 +0300
commit0656ead9268e865f3aa9718ee0148920b4655832 (patch)
tree6910135bc1efaf09b33d5dfe82cb692e122e028b
parentbf183f21d962099c9c6202c4db4baf3a08a44ece (diff)
Fix potential loss-of-precision when reading in ManyMouse
-rw-r--r--src/libs/manymouse/linux_evdev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/manymouse/linux_evdev.c b/src/libs/manymouse/linux_evdev.c
index fc768dc8c..c99500182 100644
--- a/src/libs/manymouse/linux_evdev.c
+++ b/src/libs/manymouse/linux_evdev.c
@@ -4,7 +4,9 @@
* Please see the file LICENSE.txt in the source's root directory.
*
* This file written by Ryan C. Gordon.
- * Altered to silence compiler warnings by Roman Standzikowski.
+ * Altered to:
+ * - silence compiler warnings, by Roman Standzikowski.
+ * - silence compiler warnings, by kcgen.
*/
#include "manymouse.h"
@@ -48,7 +50,7 @@ static int poll_mouse(MouseStruct *mouse, ManyMouseEvent *outevent)
while (unhandled) /* read until failure or valid event. */
{
struct input_event event;
- int br = read(mouse->fd, &event, sizeof (event));
+ const ssize_t br = read(mouse->fd, &event, sizeof (event));
if (br == -1)
{
if (errno == EAGAIN)