/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]
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));
I don't understand why I get these errors?
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));