Skip to content

Commit a3ebb09

Browse files
committed
Framework: make sure we support fmt 10.1.1
1 parent 7642a73 commit a3ebb09

File tree

12 files changed

+16
-18
lines changed

12 files changed

+16
-18
lines changed

CCDB/src/CcdbApi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ bool CcdbApi::retrieveBlob(std::string const& path, std::string const& targetdir
710710
try {
711711
o2::utils::createDirectoriesIfAbsent(fulltargetdir);
712712
} catch (std::exception e) {
713-
LOGP(error, fmt::format("Could not create local snapshot cache directory {}, reason: {}", fulltargetdir, e.what()));
713+
LOGP(error, "Could not create local snapshot cache directory {}, reason: {}", fulltargetdir, e.what());
714714
return false;
715715
}
716716

Common/Field/src/MagneticField.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ void MagneticField::rescaleField(float l3Cur, float diCur, bool uniform, int con
539539
float sclL3 = l3Cur, sclDip = diCur;
540540
MagFieldParam::BMap_t map = getFieldMapScale(sclL3, sclDip, uniform);
541541
if (map != mMapType) {
542-
LOGP(fatal, "Provided L3current={} DipCurrent={} uniform={} leads to map type {}, incompatible with loaded {}", l3Cur, diCur, uniform, map, mMapType);
542+
LOGP(fatal, "Provided L3current={} DipCurrent={} uniform={} leads to map type {}, incompatible with loaded {}", l3Cur, diCur, uniform, (int)map, (int)mMapType);
543543
}
544544
setFactorSolenoid(sclL3);
545545
setFactorDipole(sclDip);

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ void AODProducerWorkflowDPL::fillSecondaryVertices(const o2::globaltracking::Rec
12211221
if (item != mGIDToTableID.end()) {
12221222
tableIdx[i] = item->second;
12231223
} else {
1224-
LOG(warn) << fmt::format("Could not find a track index for prong ID {}", trIDs[i]);
1224+
LOG(warn) << fmt::format("Could not find a track index for prong ID {}", (int)trIDs[i]);
12251225
missing = true;
12261226
}
12271227
}

EventVisualisation/Workflow/src/FileProducer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ std::string FileProducer::newFileName() const
4747
gethostname(hostname, _POSIX_HOST_NAME_MAX);
4848

4949
auto pid = getpid();
50-
auto result = fmt::format(this->mName,
50+
auto result = fmt::format(fmt::runtime(this->mName),
5151
fmt::arg("hostname", hostname),
5252
fmt::arg("pid", pid),
5353
fmt::arg("timestamp", millisec_since_epoch),

Framework/AnalysisSupport/src/AODJAlienReaderHelpers.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ AlgorithmSpec AODJAlienReaderHelpers::rootFileReaderCallback()
246246
// get first folder of next file
247247
ntf = 0;
248248
if (!didir->readTree(outputs, dh, fcnt, ntf, totalSizeCompressed, totalSizeUncompressed)) {
249-
LOGP(fatal, "Can not retrieve tree for table {}: fileCounter {}, timeFrame {}", concrete.origin, fcnt, ntf);
249+
LOGP(fatal, "Can not retrieve tree for table {}: fileCounter {}, timeFrame {}", concrete.origin.as<std::string>(), fcnt, ntf);
250250
throw std::runtime_error("Processing is stopped!");
251251
}
252252
} else {
253-
LOGP(fatal, "Can not retrieve tree for table {}: fileCounter {}, timeFrame {}", concrete.origin, fcnt, ntf);
253+
LOGP(fatal, "Can not retrieve tree for table {}: fileCounter {}, timeFrame {}", concrete.origin.as<std::string>(), fcnt, ntf);
254254
throw std::runtime_error("Processing is stopped!");
255255
}
256256
}

Framework/Core/src/DPLWebSocket.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ void WSDPLHandler::write(std::vector<uv_buf_t>& outputs)
375375
/// Helper to return an error
376376
void WSDPLHandler::error(int code, char const* message)
377377
{
378-
static char const* errorFMT = "HTTP/1.1 {} {}\r\ncontent-type: text/plain\r\n\r\n{}: {}\r\n";
378+
static constexpr auto errorFMT = "HTTP/1.1 {} {}\r\ncontent-type: text/plain\r\n\r\n{}: {}\r\n";
379379
std::string error = fmt::format(errorFMT, code, message, code, message);
380380
char* reply = strdup(error.data());
381381
uv_buf_t bfr = uv_buf_init(reply, error.size());

Framework/Core/src/DataOutputDirector.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ void DataOutputDirector::printOut()
584584

585585
LOGP(info, " File name bases :");
586586
for (auto const& fb : mfilenameBases) {
587-
LOGP(info, fb);
587+
LOGP(info, "{}", fb);
588588
}
589589
}
590590

Framework/Core/src/DataProcessingContext.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void DataProcessorContext::preDanglingCallbacks(DanglingContext& danglingContext
5252
void DataProcessorContext::postDanglingCallbacks(DanglingContext& danglingContext)
5353
{
5454
for (auto& handle : postDanglingHandles) {
55-
LOGP(debug, "Invoking postDanglingCallback for service {} {}", handle.spec.name);
55+
LOGP(debug, "Invoking postDanglingCallback for service {}", handle.spec.name);
5656
handle.callback(danglingContext, handle.service);
5757
}
5858
}

Framework/Core/src/HTTPParser.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void decode_websocket(char* start, size_t size, WebSocketHandler& handler)
189189
std::string encode_websocket_handshake_request(const char* endpoint, const char* protocol, int version, char const* nonce,
190190
std::vector<std::pair<std::string, std::string>> headers)
191191
{
192-
char const* res =
192+
constexpr auto res =
193193
"GET {} HTTP/1.1\r\n"
194194
"Upgrade: websocket\r\n"
195195
"Connection: Upgrade\r\n"
@@ -216,7 +216,7 @@ std::string HTTPParserHelpers::calculateAccept(const char* nonce)
216216

217217
std::string encode_websocket_handshake_reply(char const* nonce)
218218
{
219-
char const* res =
219+
constexpr auto res =
220220
"HTTP/1.1 101 Switching Protocols\r\n"
221221
"Upgrade: websocket\r\n"
222222
"Connection: Upgrade\r\n"

Framework/Core/src/runDataProcessing.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ void spawnDevice(uv_loop_t* loop,
696696
close(childFds[ref.index].childstdout[1]);
697697
if (varmap.count("post-fork-command")) {
698698
auto templateCmd = varmap["post-fork-command"];
699-
auto cmd = fmt::format(templateCmd.as<std::string>(),
699+
auto cmd = fmt::format(fmt::runtime(templateCmd.as<std::string>()),
700700
fmt::arg("pid", id),
701701
fmt::arg("id", spec.id),
702702
fmt::arg("cpu", parentCPU),

0 commit comments

Comments
 (0)