In the following code, why is it needed (VOID *)in the middle of a pointer conversion?
(VOID *)
Some definition of context:
#define VOID void typedef unsigned char UINT8; ErrorDest = (EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE *) (VOID *) ((UINT8 *)Hest + Hest->Header.Length);
The only reason I see it is to prevent the compiler from giving warnings about pointer alignment.
UINT8 no alignment requirements.
UINT8
A struct . . EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE - (.. , ) , .
struct
EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE
A void* , , , .
void*
, . - .
, this_t* a = (that_t*)b;, . - , ,
this_t* a = (that_t*)b;
this_t* a = (void*)(that_t*)b; // bad, dont do this
, . undefined, - .
EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE , uint8_t [], undefined - .
uint8_t []
Source: https://habr.com/ru/post/1673274/More articles:Uncaught TypeError: Unable to read getHostNode property from null response js - javascriptКак я могу сократить следующие операторы С# if? - c#What is the date format? - phpPHP: convert negative timestamp - phpIs it safe to compare the unsigned int with the std :: string :: size_type parameter - c ++The JavaLaunchHelper class is implemented in both XXX and XXX, one of two will be used. Which one is undefined - javaWhat does +0000 mean in the context of the date returned by the twitter API? - jsonHow to convert this time format - 1480550400000 + 0000 to Y / m / d date format using php - phpDjango + Bokeh + autoload_server: get one div by shape - pythonUser Authentication in a Microservice Application Hosted on Amazon WS - authenticationAll Articles