[1/31] /usr/bin/cc -DCMAKE_SOURCE_DIR_LENGTH=59 -DSTLINK_HAVE_SYS_MMAN_H -DSTLINK_HAVE_UNISTD_H -Dstlink_shared_EXPORTS -Iinclude -Isrc/mingw -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wextra -Wshadow -D_FORTIFY_SOURCE=2 -fstrict-aliasing -Wundef -Wformat -Wformat-security -Wmissing-variable-declarations -Wshorten-64-to-32 -Wimplicit-function-declaration -Wredundant-decls -fPIC -O2 -Werror -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/stlink-shared.dir/src/sg.c.o -MF CMakeFiles/stlink-shared.dir/src/sg.c.o.d -o CMakeFiles/stlink-shared.dir/src/sg.c.o -c src/sg.c FAILED: CMakeFiles/stlink-shared.dir/src/sg.c.o /usr/bin/cc -DCMAKE_SOURCE_DIR_LENGTH=59 -DSTLINK_HAVE_SYS_MMAN_H -DSTLINK_HAVE_UNISTD_H -Dstlink_shared_EXPORTS -Iinclude -Isrc/mingw -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wextra -Wshadow -D_FORTIFY_SOURCE=2 -fstrict-aliasing -Wundef -Wformat -Wformat-security -Wmissing-variable-declarations -Wshorten-64-to-32 -Wimplicit-function-declaration -Wredundant-decls -fPIC -O2 -Werror -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/stlink-shared.dir/src/sg.c.o -MF CMakeFiles/stlink-shared.dir/src/sg.c.o.d -o CMakeFiles/stlink-shared.dir/src/sg.c.o -c src/sg.c src/sg.c:128:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("%s: receiving failed: %d\n", __func__, ret); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:128:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:132:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("%s: received unexpected amount: %d\n", __func__, transferred); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:132:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:141:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("status signature was invalid: %#x\n", rsig); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:141:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:157:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG(dbugblah); ^~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:157:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:175:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("Sending usb m-s cmd: cdblen:%d, rxsize=%d\n", cdb_length, expected_rx_size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:175:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:219:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("sending failed: %d\n", ret); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:219:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:235:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("Fetching sense...\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:235:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:245:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("refusing to send request sense with tag 0\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:245:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:261:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("receiving sense failed: %d\n", ret); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:261:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:265:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("received unexpected amount of sense: %d != %d\n", transferred, sizeof(sense)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:265:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:270:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("receiving sense failed with status: %02x\n", status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:270:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:274:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("No sense data\n"); ^~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:274:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:276:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("Sense KCQ: %02X %02X %02X\n", sense[2] & 0x0f, sense[12], sense[13]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:276:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:304:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("sending failed: %d\n", ret); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:304:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:313:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("receiving status failed: %d\n", status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:313:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:317:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("receiving status not passed :(: %02x\n", status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:317:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:354:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("Receiving failed: %d\n", ret); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:354:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:359:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("received unexpected amount: %d != %d\n", real_transferred, rx_length); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:359:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/sg.c:367:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("receiving status failed: %d\n", status); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/sg.c:367:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. [2/31] /usr/bin/cc -DCMAKE_SOURCE_DIR_LENGTH=59 -DSTLINK_HAVE_SYS_MMAN_H -DSTLINK_HAVE_UNISTD_H -Dstlink_shared_EXPORTS -Iinclude -Isrc/mingw -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wextra -Wshadow -D_FORTIFY_SOURCE=2 -fstrict-aliasing -Wundef -Wformat -Wformat-security -Wmissing-variable-declarations -Wshorten-64-to-32 -Wimplicit-function-declaration -Wredundant-decls -fPIC -O2 -Werror -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/stlink-shared.dir/src/common.c.o -MF CMakeFiles/stlink-shared.dir/src/common.c.o.d -o CMakeFiles/stlink-shared.dir/src/common.c.o -c src/common.c FAILED: CMakeFiles/stlink-shared.dir/src/common.c.o /usr/bin/cc -DCMAKE_SOURCE_DIR_LENGTH=59 -DSTLINK_HAVE_SYS_MMAN_H -DSTLINK_HAVE_UNISTD_H -Dstlink_shared_EXPORTS -Iinclude -Isrc/mingw -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wextra -Wshadow -D_FORTIFY_SOURCE=2 -fstrict-aliasing -Wundef -Wformat -Wformat-security -Wmissing-variable-declarations -Wshorten-64-to-32 -Wimplicit-function-declaration -Wredundant-decls -fPIC -O2 -Werror -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/stlink-shared.dir/src/common.c.o -MF CMakeFiles/stlink-shared.dir/src/common.c.o.d -o CMakeFiles/stlink-shared.dir/src/common.c.o -c src/common.c src/common.c:254:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("Failed to unlock flash!\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:254:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:258:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("Successfully unlocked flash\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:258:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:537:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_close ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:537:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:547:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_exit_debug_mode ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:547:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:556:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_enter_swd_mode ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:556:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:562:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_force_debug_mode ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:562:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:567:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_exit_dfu_mode ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:567:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:574:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_core_id ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:574:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:577:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ELOG("Failed to read core_id\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:37:19: note: expanded from macro 'ELOG' #define ELOG(...) ELOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:36:53: note: expanded from macro 'ELOG_HELPER' #define ELOG_HELPER(format, ...) ugly_log(UERROR, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:577:9: note: use array indexing to silence this warning include/stlink/logging.h:37:19: note: expanded from macro 'ELOG' #define ELOG(...) ELOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:36:53: note: expanded from macro 'ELOG_HELPER' #define ELOG_HELPER(format, ...) ugly_log(UERROR, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:582:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("core_id = 0x%08x\n", sl->core_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:582:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:623:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ILOG("Loading device parameters....\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:623:5: note: use array indexing to silence this warning include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:641:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("unknown chip id! %#x\n", chip_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:641:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:646:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("Invalid flash type, please check device declaration\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:646:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:684:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ILOG("Device connected is: %s, id %#x\n", params->description, chip_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:684:5: note: use array indexing to silence this warning include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:686:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ILOG("SRAM size: %#x bytes (%d KiB), Flash: %#x bytes (%d KiB) in pages of %u bytes\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:686:5: note: use array indexing to silence this warning include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:693:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_reset ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:693:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:698:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_jtag_reset ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:698:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:703:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** stlink_run ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:703:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/common.c:708:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("*** set_swdclk ***\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/common.c:708:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. [3/31] /usr/bin/cc -DCMAKE_SOURCE_DIR_LENGTH=59 -DSTLINK_HAVE_SYS_MMAN_H -DSTLINK_HAVE_UNISTD_H -Dstlink_shared_EXPORTS -Iinclude -Isrc/mingw -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wextra -Wshadow -D_FORTIFY_SOURCE=2 -fstrict-aliasing -Wundef -Wformat -Wformat-security -Wmissing-variable-declarations -Wshorten-64-to-32 -Wimplicit-function-declaration -Wredundant-decls -fPIC -O2 -Werror -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/stlink-shared.dir/src/chipid.c.o -MF CMakeFiles/stlink-shared.dir/src/chipid.c.o.d -o CMakeFiles/stlink-shared.dir/src/chipid.c.o -c src/chipid.c [4/31] /usr/bin/cc -DCMAKE_SOURCE_DIR_LENGTH=59 -DSTLINK_HAVE_SYS_MMAN_H -DSTLINK_HAVE_UNISTD_H -Dstlink_shared_EXPORTS -Iinclude -Isrc/mingw -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wextra -Wshadow -D_FORTIFY_SOURCE=2 -fstrict-aliasing -Wundef -Wformat -Wformat-security -Wmissing-variable-declarations -Wshorten-64-to-32 -Wimplicit-function-declaration -Wredundant-decls -fPIC -O2 -Werror -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/stlink-shared.dir/src/usb.c.o -MF CMakeFiles/stlink-shared.dir/src/usb.c.o.d -o CMakeFiles/stlink-shared.dir/src/usb.c.o -c src/usb.c FAILED: CMakeFiles/stlink-shared.dir/src/usb.c.o /usr/bin/cc -DCMAKE_SOURCE_DIR_LENGTH=59 -DSTLINK_HAVE_SYS_MMAN_H -DSTLINK_HAVE_UNISTD_H -Dstlink_shared_EXPORTS -Iinclude -Isrc/mingw -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wextra -Wshadow -D_FORTIFY_SOURCE=2 -fstrict-aliasing -Wundef -Wformat -Wformat-security -Wmissing-variable-declarations -Wshorten-64-to-32 -Wimplicit-function-declaration -Wredundant-decls -fPIC -O2 -Werror -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/stlink-shared.dir/src/usb.c.o -MF CMakeFiles/stlink-shared.dir/src/usb.c.o.d -o CMakeFiles/stlink-shared.dir/src/usb.c.o -c src/usb.c src/usb.c:561:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("xpsr = 0x%08x\n", read_uint32(sl->q_buf, 64)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:561:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:562:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("main_sp = 0x%08x\n", read_uint32(sl->q_buf, 68)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:562:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:563:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("process_sp = 0x%08x\n", read_uint32(sl->q_buf, 72)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:563:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:564:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("rw = 0x%08x\n", read_uint32(sl->q_buf, 76)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:564:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:565:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("rw2 = 0x%08x\n", read_uint32(sl->q_buf, 80)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:565:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:590:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("r_idx (%2d) = 0x%08x\n", r_idx, r); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:590:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:634:5: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] DLOG("r_idx (%2d) = 0x%08x\n", r_idx, r); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:634:5: note: use array indexing to silence this warning include/stlink/logging.h:31:19: note: expanded from macro 'DLOG' #define DLOG(...) DLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:30:53: note: expanded from macro 'DLOG_HELPER' #define DLOG_HELPER(format, ...) ugly_log(UDEBUG, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:791:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("failed to init libusb context, wrong version of libraries?\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:791:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:810:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("STLINK_DEVICE must be : format\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:810:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:816:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ILOG("bus %03d dev %03d\n",devBus, devAddr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:816:9: note: use array indexing to silence this warning include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:861:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG ("Couldn't find %s ST-Link/V2 devices\n",(devBus && devAddr)?"matched":"any"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:861:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:866:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("Error %d (%s) opening ST-Link/V2 device %03d:%03d\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:866:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:878:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("libusb_detach_kernel_driver(() error %s\n", strerror(-ret)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:878:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:885:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("libusb_get_configuration()\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:885:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:893:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("libusb_set_configuration() failed\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:893:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:899:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("Stlink usb device found, but unable to claim (probably already in use?)\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:899:9: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:916:9: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ILOG("-- exit_dfu_mode\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:916:9: note: use array indexing to silence this warning include/stlink/logging.h:33:19: note: expanded from macro 'ILOG' #define ILOG(...) ILOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:32:52: note: expanded from macro 'ILOG_HELPER' #define ILOG_HELPER(format, ...) ugly_log(UINFO, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:972:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("failed to get libusb device descriptor\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:972:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ src/usb.c:996:13: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] WLOG("failed to get libusb device descriptor\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^~~~~~~~~~~~~ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/usb.c:996:13: note: use array indexing to silence this warning include/stlink/logging.h:35:19: note: expanded from macro 'WLOG' #define WLOG(...) WLOG_HELPER(__VA_ARGS__, "") ^ include/stlink/logging.h:34:52: note: expanded from macro 'WLOG_HELPER' #define WLOG_HELPER(format, ...) ugly_log(UWARN, UGLY_LOG_FILE, format, __VA_ARGS__) ^ include/stlink/logging.h:26:32: note: expanded from macro 'UGLY_LOG_FILE' #define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. ninja: build stopped: subcommand failed.