mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Use uint8_t* not void* in memcpy()
Computrainer spinscan memcpy() used offsets but failed to declare the datatype used by pointers. Interestingly, some compilers will assume a void* points to a byte, whilst others will rightly complain.
This commit is contained in:
@@ -373,8 +373,8 @@ void Computrainer::unpackTelemetry(int &ss1, int &ss2, int &ss3, int &buttons, i
|
||||
value12 = value8 | (b1&7)<<9 | (b3&2)<<7;
|
||||
|
||||
if (buttons&64) {
|
||||
memcpy((void*)spinScan, (void*)ss+3, 21);
|
||||
memcpy((void*)spinScan+21, (void*)ss, 3);
|
||||
memcpy((uint8_t*)spinScan, (uint8_t*)ss+3, 21);
|
||||
memcpy((uint8_t*)spinScan+21, (uint8_t*)ss, 3);
|
||||
//for (pos=0; pos<24; pos++) fprintf(stderr, "%d, ", ss[pos]);
|
||||
//fprintf(stderr, "\n");
|
||||
pos=0;
|
||||
|
||||
Reference in New Issue
Block a user