uTasker / uTasker-Kinetis

uTasker V1.4.11 based open source version for Kinetis and STM32 parts
60 stars 35 forks source link

code reading comments #2: dupicate type convert (unsigned char *) #8

Closed navahooCite closed 5 years ago

navahooCite commented 5 years ago

https://github.com/uTasker/uTasker-Kinetis/blob/485886cf1d39c44d55510e292617270069e67c0f/Hardware/Kinetis/kinetis.c#L1020

Suppose should be: ptrVect = (VECTOR_TABLE )((unsigned char )&vector_ram);

uTasker commented 5 years ago

ptrVect = (VECTOR_TABLE *)&vector_ram;

is also OK. The unnecessary castings are not a problem but I'll change on next commit.

Regards

Mark