siable warning to truncate and compile fix

This commit is contained in:
maliakal_d 2021-11-11 10:12:08 +01:00
parent 85d350b48b
commit 25eecf7039
2 changed files with 4 additions and 0 deletions

View File

@ -138,6 +138,7 @@ sls_enable_cxx_warning("-Wduplicated-cond")
sls_disable_cxx_warning("-Wclass-memaccess")
sls_disable_c_warning("-Wstringop-truncation")
sls_disable_c_warning("-Wformat-nonliteral")
sls_disable_c_warning("-Wformat-truncation")
if(SLS_USE_SANITIZER)

View File

@ -576,6 +576,9 @@ int waitForFPGAtoTouchFlash(char *mess) {
}
int moveBinaryFile(char *mess, char *serverName) {
char cmd[MAX_STR_LENGTH] = {0};
char retvals[MAX_STR_LENGTH] = {0};
char *format = "mv %s %s";
if (snprintf(cmd, MAX_STR_LENGTH, format, TEMP_PROG_FILE_NAME,
serverName) >= MAX_STR_LENGTH) {