sprintf deprecated on macos
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
c5e86ae0ae
commit
8200c6d920
|
|
@ -344,7 +344,9 @@ get_target_property(SWIG_FILES sta_swig SOURCES)
|
|||
foreach(SWIG_FILE ${SWIG_FILES})
|
||||
set_source_files_properties(${SWIG_FILE}
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "-Wno-cast-qual;-Wno-missing-braces"
|
||||
# No simple way to modify the swig template that emits code full of warnings
|
||||
# so suppress them.
|
||||
COMPILE_OPTIONS "-Wno-cast-qual;-Wno-missing-braces;-Wno-deprecated-declarations"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
|
|
|||
|
|
@ -729,8 +729,9 @@ SdfWriter::sdfPathName(const Pin *pin)
|
|||
else {
|
||||
char *inst_path = sdfPathName(inst);
|
||||
const char *port_name = sdfPortName(pin);
|
||||
char *sdf_name = makeTmpString(strlen(inst_path)+1+strlen(port_name)+1);
|
||||
sprintf(sdf_name, "%s%c%s", inst_path, sdf_divider_, port_name);
|
||||
size_t length = strlen(inst_path) + 1 + strlen(port_name) + 1;
|
||||
char *sdf_name = makeTmpString(length);
|
||||
snprintf(sdf_name, length, "%s%c%s", inst_path, sdf_divider_, port_name);
|
||||
return sdf_name;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue