Closed jeanthom closed 5 years ago
cc -Wall -Wextra -Werror -I/usr/local/Cellar/libusb/1.0.22/include/libusb-1.0 -o src/main.o -c src/main.c cc -Wall -Wextra -Werror -I/usr/local/Cellar/libusb/1.0.22/include/libusb-1.0 -o src/stlink.o -c src/stlink.c In file included from src/stlink.c:32: src/crypto.h:22:6: error: conflicting types for 'encrypt' void encrypt(unsigned char *key, unsigned char *data, unsigned int length); ^ /usr/include/unistd.h:549:7: note: previous declaration is here void encrypt(char *, int) __DARWIN_ALIAS(encrypt); ^ src/stlink.c:126:68: error: too many arguments to function call, expected 2, have 3 encrypt((unsigned char*)"I am key, wawawa", infos->firmware_key, 16); ~~~~~~~ ^~ /usr/include/unistd.h:549:1: note: 'encrypt' declared here void encrypt(char *, int) __DARWIN_ALIAS(encrypt); ^ src/stlink.c:196:47: error: too many arguments to function call, expected 2, have 3 encrypt(stlink_infos->firmware_key, data, data_len); ~~~~~~~ ^~~~~~~~ /usr/include/unistd.h:549:1: note: 'encrypt' declared here void encrypt(char *, int) __DARWIN_ALIAS(encrypt); ^ 3 errors generated. make: *** [src/stlink.o] Error 1