maximkulkin / esp32-homekit-camera

Firmware for esp32-camera module to act as Apple Homekit IP camera
MIT License
395 stars 79 forks source link

Compilation error #35

Closed Kristian8606 closed 4 years ago

Kristian8606 commented 4 years ago

I don't understand why I get these errors?

/Users/kristiandimitrov/esp/esp32-homekit-camera/components/homekit/src/storage.c: In function 'homekit_storage_init': /Users/kristiandimitrov/esp/esp32-homekit-camera/components/homekit/src/storage.c:56:38: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess] strncpy(magic, magic1, sizeof(magic1)); ^ In file included from /Users/kristiandimitrov/esp/esp32-homekit-camera/components/homekit/src/storage.c:6: /Users/kristiandimitrov/esp/esp32-homekit-camera/components/homekit/src/storage.c: In function 'homekit_storage_can_add_pairing': /Users/kristiandimitrov/esp/esp32-homekit-camera/components/homekit/src/port.h:20:85: warning: value computed is not used [-Wunused-value]

define spiflash_read(addr, buffer, size) (spi_flash_read((addr), (buffer), (size)) == ESP_OK)

camera/components/homekit/src/storage.c:233:39: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess] strncpy(data.magic, magic1, sizeof(magic1));