Hi,

 Unfortunately this patch not only doesn't fix anything, it actively breaks the 
code. If you look at the comments at the top of the file, you'll see that the 
X/Y movement deltas (dX/dY) are 9-bit values, not 8-bit. So yes, -255 and 255 
*will* fit and are not out of range.

 You are welcome to suggest a different patch that makes clang happy and 
doesn't break the code. But clearly reducing the range from 9 to 8 bits is not 
it -- in other words, the assumption that the code is attempting to express the 
-255/255 range as int8_t is incorrect.

      Michal

----- Original Message -----
From: [email protected]
To: [email protected]
Sent: Friday, March 13, 2015 9:57:26 PM GMT +01:00 Amsterdam / Berlin / Bern / 
Rome / Stockholm / Vienna
Subject: [vbox-dev] [PATCH 3/8] Fixes out-of-range values

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

- -255* and 255 can never be expressed in int8_t.  Thus, the macros
never worked properly.  Fix them to fit in signed 8-bit integer.

Jung-uk Kim

* Note: It was -256 until r54271.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVA08pAAoJEHyflib82/FGOtIH/jrKxqL0opa1OjriGJogaPud
3u1X5hxxBo5iGhY1KxzELH0y2fx+mN39Wfqw9xDKGargqmlU0N43zBoALLT5YWo8
W1QwP9NIFq/+KUWzrcpa1qwY/nof1FgMt9ARb3XrrmmEoKuyUrfix2KfFE2gdB0r
5zIJCnJLeVhtcDGCvynY6MA7587kljetfUFMXOGeBomrCV6DvYON7saO1gZWrqvH
y0yv5Yck9s3BeT7eW67K6gmLQ/sP4G8V8z5DHrVXH+C7otAF4yF6T06kJd0NKhPp
RI+u4Gr6jiPWJJ7K7HsdYyriewFf/UXdjTcKEOKsrVJT0SR/MAEyxIUKuklVp/o=
=EaMj
-----END PGP SIGNATURE-----

_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to