Skip to content

Commit

Permalink
Merge pull request #4063 from pnorbert/fix-for-gcc4.8.2
Browse files Browse the repository at this point in the history
fixes to still be able to build with gcc 4.8.2.
  • Loading branch information
pnorbert committed Mar 2, 2024
2 parents 4ea9e1c + 82c579d commit a9a9d8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions source/adios2/engine/bp5/BP5Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,9 @@ void BP5Reader::PerformRemoteGets()

void BP5Reader::PerformLocalGets()
{
auto lf_CompareReqSubfile = [&](adios2::format::BP5Deserializer::ReadRequest &r1,
adios2::format::BP5Deserializer::ReadRequest &r2) -> bool {
auto lf_CompareReqSubfile =
[&](const adios2::format::BP5Deserializer::ReadRequest &r1,
const adios2::format::BP5Deserializer::ReadRequest &r2) -> bool {
return (m_WriterMap[m_WriterMapIndex[r1.Timestep]].RankToSubfile[r1.WriterRank] <
m_WriterMap[m_WriterMapIndex[r2.Timestep]].RankToSubfile[r2.WriterRank]);
};
Expand Down
2 changes: 1 addition & 1 deletion source/adios2/toolkit/transport/file/FileHTTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void FileHTTP::Read(char *buffer, size_t size, size_t start)
MAX_REQUEST_LEN = 1024
};
char request[MAX_REQUEST_LEN] = {'\0'};
int request_len = snprintf(request, MAX_REQUEST_LEN, request_template, m_Name.c_str(),
int request_len = snprintf(request, MAX_REQUEST_LEN, request_template.c_str(), m_Name.c_str(),
m_hostname.c_str(), start, start + size - 1);
if (request_len >= MAX_REQUEST_LEN)
{
Expand Down
2 changes: 1 addition & 1 deletion source/adios2/toolkit/transport/file/FileHTTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class FileHTTP : public Transport
int m_Errno = 0;
bool m_IsOpening = false;
/* if filename is very lomg, we can get lout from array boundaries */
char request_template[128] = "GET %s HTTP/1.1\r\nHost: %s\r\nRange: bytes=%d-%d\r\n\r\n";
std::string request_template = "GET %s HTTP/1.1\r\nHost: %s\r\nRange: bytes=%d-%d\r\n\r\n";
std::string m_hostname = "localhost";
int m_server_port = 9999;
struct sockaddr_in sockaddr_in;
Expand Down

0 comments on commit a9a9d8d

Please sign in to comment.