From b34198fc2402a7bad1dba3ff446a400ad6069b37 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 18 Sep 2024 20:50:52 +0200 Subject: [PATCH] Assign to a const char* when using std::getenv --- k4FWCore/components/PodioOutput.cpp | 2 +- k4FWCore/components/Writer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/k4FWCore/components/PodioOutput.cpp b/k4FWCore/components/PodioOutput.cpp index 2d8e774b..56a64b38 100644 --- a/k4FWCore/components/PodioOutput.cpp +++ b/k4FWCore/components/PodioOutput.cpp @@ -140,7 +140,7 @@ StatusCode PodioOutput::finalize() { // Collect all the metadata podio::Frame config_metadata_frame{}; config_metadata_frame.putParameter("gaudiConfigOptions", config_data); - if (const char* env_key4hep_stack = std::getenv("KEY4HEP_STACK")) { + if (const auto* env_key4hep_stack = std::getenv("KEY4HEP_STACK")) { std::string s_env_key4hep_stack = env_key4hep_stack; config_metadata_frame.putParameter("key4hepstack", s_env_key4hep_stack); } diff --git a/k4FWCore/components/Writer.cpp b/k4FWCore/components/Writer.cpp index a613be8e..5432aa5e 100644 --- a/k4FWCore/components/Writer.cpp +++ b/k4FWCore/components/Writer.cpp @@ -117,7 +117,7 @@ class Writer final : public Gaudi::Functional::ConsumergetWriter()->writeFrame(config_metadata_frame, "configuration_metadata");