diff --git a/flang/lib/Evaluate/intrinsics.cpp b/flang/lib/Evaluate/intrinsics.cpp index 5825465289717c..e8f3c5f1161afb 100644 --- a/flang/lib/Evaluate/intrinsics.cpp +++ b/flang/lib/Evaluate/intrinsics.cpp @@ -2622,7 +2622,8 @@ bool IntrinsicProcTable::Implementation::IsDualIntrinsic( const std::string &name) const { // Collection for some intrinsics with function and subroutine form, // in order to pass the semantic check. - static const std::string dualIntrinsic[]{{"etime"}, {"getcwd"}, {"rename"}}; + static const std::string dualIntrinsic[]{ + {"etime"s}, {"getcwd"s}, {"rename"s}}; return std::find_if(std::begin(dualIntrinsic), std::end(dualIntrinsic), [&name](const std::string &dualName) { diff --git a/flang/runtime/misc-intrinsic.cpp b/flang/runtime/misc-intrinsic.cpp index 9008944608e2e2..2f7fcd2e2341fa 100644 --- a/flang/runtime/misc-intrinsic.cpp +++ b/flang/runtime/misc-intrinsic.cpp @@ -12,8 +12,8 @@ #include "flang/Common/optional.h" #include "flang/Runtime/descriptor.h" #include -#include #include +#include namespace Fortran::runtime { @@ -66,10 +66,10 @@ void RTDECL(Rename)(const Descriptor &path1, const Descriptor &path2, path2.OffsetElement(), path2.ElementBytes(), terminator)}; // We simply call rename(2) from POSIX - int result = rename(pathSrc, pathDst); + int result{rename(pathSrc, pathDst)}; if (status) { // When an error has happened, - int errorCode = 0; // Assume success + int errorCode{0}; // Assume success if (result != 0) { // The rename operation has failed, so return the error code as status. errorCode = errno;