mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
fixes for warnings
This commit is contained in:
parent
6b94f266bf
commit
d7bbcb24c9
@ -137,6 +137,7 @@ sls_enable_cxx_warning("-Wnull-dereference")
|
|||||||
sls_enable_cxx_warning("-Wduplicated-cond")
|
sls_enable_cxx_warning("-Wduplicated-cond")
|
||||||
sls_disable_cxx_warning("-Wclass-memaccess")
|
sls_disable_cxx_warning("-Wclass-memaccess")
|
||||||
sls_disable_c_warning("-Wstringop-truncation")
|
sls_disable_c_warning("-Wstringop-truncation")
|
||||||
|
sls_disable_c_warning("-Wformat-nonliteral")
|
||||||
|
|
||||||
|
|
||||||
if(SLS_USE_SANITIZER)
|
if(SLS_USE_SANITIZER)
|
||||||
|
@ -75,7 +75,7 @@ int deleteOldFile(char *mess) {
|
|||||||
char *format = "rm -fr %s";
|
char *format = "rm -fr %s";
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, TEMP_PROG_FILE_NAME) >=
|
if (snprintf(cmd, MAX_STR_LENGTH, format, TEMP_PROG_FILE_NAME) >=
|
||||||
MAX_STR_LENGTH) {
|
MAX_STR_LENGTH) {
|
||||||
sptrcpy(
|
strcpy(
|
||||||
mess,
|
mess,
|
||||||
"Could not program fpga. Command to delete old file is too long\n");
|
"Could not program fpga. Command to delete old file is too long\n");
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
@ -242,9 +242,8 @@ int eraseFlash(char *mess) {
|
|||||||
char *format = "flash_eraseall %s";
|
char *format = "flash_eraseall %s";
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, flashDriveName) >=
|
if (snprintf(cmd, MAX_STR_LENGTH, format, flashDriveName) >=
|
||||||
MAX_STR_LENGTH) {
|
MAX_STR_LENGTH) {
|
||||||
ret = FAIL;
|
strcpy(mess,
|
||||||
sptrcpy(mess,
|
"Could not program fpga. Command to erase flash is too long\n");
|
||||||
"Could not program fpga. Command to erase flash is too long\n");
|
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
@ -133,9 +133,8 @@ int eraseFlash(char *mess) {
|
|||||||
char *format = "flash_erase %s 0 0";
|
char *format = "flash_erase %s 0 0";
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, flashDriveName) >=
|
if (snprintf(cmd, MAX_STR_LENGTH, format, flashDriveName) >=
|
||||||
MAX_STR_LENGTH) {
|
MAX_STR_LENGTH) {
|
||||||
ret = FAIL;
|
strcpy(mess,
|
||||||
sptrcpy(mess,
|
"Could not program fpga. Command to erase flash is too long\n");
|
||||||
"Could not program fpga. Command to erase flash is too long\n");
|
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user