I get a massive list of errors when trying to compile this library I have used different models of ESP32 Board and they are all doing the same, I downgraded my esp32 boards in the IDE and it also made no difference below are the errors.
`In file included from c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:6:0:
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c: In function 'ps5_l2cap_reconnect':
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:55: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=]
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL'
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE'
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=]
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL'
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE'
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=]
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL'
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE'
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=]
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL'
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE'
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=]
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL'
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
^
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE'
ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret);
^
cc1.exe: some warnings being treated as errors
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp: In member function 'bool ps5Controller::begin(const char)':
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
if (sscanf(mac, ESP_BD_ADDR_STR, ESP_BD_ADDR_HEX_PTR(addr)) != ESP_BD_ADDR_LEN) {
^
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'uint8_t {aka unsigned char}' [-Werror=format=]
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'uint8_t {aka unsigned char*}' [-Werror=format=]
cc1plus.exe: some warnings being treated as errors`
I get a massive list of errors when trying to compile this library I have used different models of ESP32 Board and they are all doing the same, I downgraded my esp32 boards in the IDE and it also made no difference below are the errors.
`In file included from c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:6:0: c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c: In function 'ps5_l2cap_reconnect': c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:55: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=] ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL' if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=] ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL' if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=] ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL' if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=] ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL' if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:1: error: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Werror=format=] ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:244:59: note: in definition of macro 'LOG_FORMAT'
define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:311:41: note: in expansion of macro 'ESP_LOG_LEVEL' if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ ^ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/log/esp_log.h:265:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
define ESP_LOGE( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5_l2cap.c:120:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(ps5_TAG, "L2CA_CONNECT_REQ ret=%d\n", ret); ^ cc1.exe: some warnings being treated as errors c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp: In member function 'bool ps5Controller::begin(const char)': c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint8_t {aka unsigned char}' [-Werror=format=] if (sscanf(mac, ESP_BD_ADDR_STR, ESP_BD_ADDR_HEX_PTR(addr)) != ESP_BD_ADDR_LEN) { ^ c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'uint8_t {aka unsigned char}' [-Werror=format=] c:\Users\User\Documents\Arduino\libraries\ps5Controller\src\ps5Controller.cpp:47:61: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'uint8_t {aka unsigned char*}' [-Werror=format=] cc1plus.exe: some warnings being treated as errors`