db_tutorial icon indicating copy to clipboard operation
db_tutorial copied to clipboard

make failed on windows

Open jiluhu opened this issue 6 years ago • 1 comments

image

jiluhu avatar Aug 07 '19 08:08 jiluhu

@jiluhu

Pointer arithmetic on void pointers is not part of the C standard and may not work with your compiler.

This question with accompanying answers should help: https://stackoverflow.com/questions/8162409/c-casting-from-uint32-t-to-void

Example:

uint32_t* internal_node_num_keys(void* node) {
  return node + INTERNAL_NODE_NUM_KEYS_OFFSET;
}

to

uint32_t* internal_node_num_keys(void* node) {
  return (uint8_t*)node + INTERNAL_NODE_NUM_KEYS_OFFSET;
}

imsoo avatar Dec 26 '19 14:12 imsoo