Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Common/src/geometry/CPhysicalGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7946,9 +7946,9 @@ void CPhysicalGeometry::SetSensitivity(CConfig* config) {
if (config->GetRead_Binary_Restart()) {
filename = config->GetFilename(filename, ".dat", nTimeIter - 1);

char str_buf[CGNS_STRING_SIZE], fname[100];
char str_buf[CGNS_STRING_SIZE];
unsigned short iVar;
strcpy(fname, filename.c_str());
const char* fname = filename.c_str();
int nRestart_Vars = SU2_RESTART_HEADER_SIZE, nFields;
int* Restart_Vars = new int[SU2_RESTART_HEADER_SIZE];
passivedouble* Restart_Data = nullptr;
Expand Down Expand Up @@ -8298,8 +8298,7 @@ void CPhysicalGeometry::SetSensitivity(CConfig* config) {

/*--- First, check that this is not a binary restart file. ---*/

char fname[100];
strcpy(fname, filename.c_str());
const char* fname = filename.c_str();
int magic_number;

#ifndef HAVE_MPI
Expand Down
6 changes: 2 additions & 4 deletions SU2_CFD/src/solvers/CBaselineSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ void CBaselineSolver::SetOutputVariables(CGeometry *geometry, CConfig *config) {

filename = config->GetFilename(filename, ".dat", config->GetTimeIter());

char fname[100];
strcpy(fname, filename.c_str());
const char* fname = filename.c_str();
int nVar_Buf = SU2_RESTART_HEADER_SIZE;
int var_buf[SU2_RESTART_HEADER_SIZE];

Expand Down Expand Up @@ -242,8 +241,7 @@ void CBaselineSolver::SetOutputVariables(CGeometry *geometry, CConfig *config) {

/*--- First, check that this is not a binary restart file. ---*/

char fname[100];
strcpy(fname, filename.c_str());
const char* fname = filename.c_str();
int magic_number;

#ifndef HAVE_MPI
Expand Down
6 changes: 2 additions & 4 deletions SU2_CFD/src/solvers/CBaselineSolver_FEM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ void CBaselineSolver_FEM::SetOutputVariables(CGeometry *geometry, CConfig *confi

/*--- All ranks open the file using MPI. ---*/

char fname[100];
strcpy(fname, filename.c_str());
const char* fname = filename.c_str();
ierr = MPI_File_open(SU2_MPI::GetComm(), fname, MPI_MODE_RDONLY, MPI_INFO_NULL, &fhw);

/*--- Error check opening the file. ---*/
Expand Down Expand Up @@ -244,8 +243,7 @@ void CBaselineSolver_FEM::SetOutputVariables(CGeometry *geometry, CConfig *confi

/*--- All ranks open the file using MPI. ---*/

char fname[100];
strcpy(fname, filename.c_str());
const char* fname = filename.c_str();
ierr = MPI_File_open(SU2_MPI::GetComm(), fname, MPI_MODE_RDONLY, MPI_INFO_NULL, &fhw);

/*--- Error check opening the file. ---*/
Expand Down
7 changes: 3 additions & 4 deletions SU2_CFD/src/solvers/CSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3018,8 +3018,7 @@ void CSolver::Read_SU2_Restart_ASCII(CGeometry *geometry, const CConfig *config,

/*--- First, check that this is not a binary restart file. ---*/

char fname[100];
strcpy(fname, val_filename.c_str());
const char* fname = val_filename.c_str();
int magic_number;

#ifndef HAVE_MPI
Expand Down Expand Up @@ -3167,8 +3166,8 @@ void CSolver::Read_SU2_Restart_ASCII(CGeometry *geometry, const CConfig *config,
void CSolver::Read_SU2_Restart_Binary(CGeometry *geometry, const CConfig *config, string val_filename) {
SU2_ZONE_SCOPED

char str_buf[CGNS_STRING_SIZE], fname[100];
strcpy(fname, val_filename.c_str());
char str_buf[CGNS_STRING_SIZE];
const char* fname = val_filename.c_str();
const int nRestart_Vars = SU2_RESTART_HEADER_SIZE;
Restart_Vars.resize(nRestart_Vars);
fields.clear();
Expand Down
Loading