diff --git a/unit_tests/falco/test_configuration.cpp b/unit_tests/falco/test_configuration.cpp index 1088ae9e..cba3f047 100644 --- a/unit_tests/falco/test_configuration.cpp +++ b/unit_tests/falco/test_configuration.cpp @@ -35,7 +35,7 @@ TEST(Configuration, configuration_exceptions) yaml_helper conf; /* Broken YAML */ - string sample_broken_yaml = sample_yaml + " / bad_symbol"; + std::string sample_broken_yaml = sample_yaml + " / bad_symbol"; EXPECT_ANY_THROW(conf.load_from_string(sample_broken_yaml)); /* Right YAML */ @@ -67,16 +67,16 @@ TEST(Configuration, read_yaml_fields) /* get some fields */ ASSERT_EQ(conf.get_scalar("base_value.id", -1), 1); - ASSERT_STREQ(conf.get_scalar("base_value.name", "none").c_str(), "sample_name"); + ASSERT_STREQ(conf.get_scalar("base_value.name", "none").c_str(), "sample_name"); ASSERT_EQ(conf.get_scalar("base_value.subvalue.subvalue2.boolean", false), true); /* get list field elements */ - ASSERT_STREQ(conf.get_scalar("base_value_2.sample_list[0]", "none").c_str(), "elem1"); - ASSERT_STREQ(conf.get_scalar("base_value_2.sample_list[1]", "none").c_str(), "elem2"); - ASSERT_STREQ(conf.get_scalar("base_value_2.sample_list[2]", "none").c_str(), "elem3"); + ASSERT_STREQ(conf.get_scalar("base_value_2.sample_list[0]", "none").c_str(), "elem1"); + ASSERT_STREQ(conf.get_scalar("base_value_2.sample_list[1]", "none").c_str(), "elem2"); + ASSERT_STREQ(conf.get_scalar("base_value_2.sample_list[2]", "none").c_str(), "elem3"); /* get sequence */ - vector seq; + std::vector seq; conf.get_sequence(seq, "base_value_2.sample_list"); ASSERT_EQ(seq.size(), 3); ASSERT_STREQ(seq[0].c_str(), "elem1"); @@ -86,7 +86,7 @@ TEST(Configuration, read_yaml_fields) TEST(Configuration, modify_yaml_fields) { - string key = "base_value.subvalue.subvalue2.boolean"; + std::string key = "base_value.subvalue.subvalue2.boolean"; yaml_helper conf; /* Get original value */ diff --git a/userspace/falco/app/actions/list_fields.cpp b/userspace/falco/app/actions/list_fields.cpp index e1bbd980..0348b0d2 100644 --- a/userspace/falco/app/actions/list_fields.cpp +++ b/userspace/falco/app/actions/list_fields.cpp @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -#include "fields_info.h" - #include "actions.h" using namespace falco::app; diff --git a/userspace/falco/configuration.cpp b/userspace/falco/configuration.cpp index 1cf7e03a..cf215701 100644 --- a/userspace/falco/configuration.cpp +++ b/userspace/falco/configuration.cpp @@ -116,7 +116,7 @@ void falco_configuration::load_yaml(const std::string& config_name, const yaml_h filename = config.get_scalar("file_output.filename", ""); if(filename == std::string("")) { - throw logic_error("Error reading config file (" + config_name + "): file output enabled but no filename in configuration block"); + throw std::logic_error("Error reading config file (" + config_name + "): file output enabled but no filename in configuration block"); } file_output.options["filename"] = filename; @@ -148,7 +148,7 @@ void falco_configuration::load_yaml(const std::string& config_name, const yaml_h program = config.get_scalar("program_output.program", ""); if(program == std::string("")) { - throw logic_error("Error reading config file (" + config_name + "): program output enabled but no program in configuration block"); + throw std::logic_error("Error reading config file (" + config_name + "): program output enabled but no program in configuration block"); } program_output.options["program"] = program; @@ -167,7 +167,7 @@ void falco_configuration::load_yaml(const std::string& config_name, const yaml_h if(url == std::string("")) { - throw logic_error("Error reading config file (" + config_name + "): http output enabled but no url in configuration block"); + throw std::logic_error("Error reading config file (" + config_name + "): http output enabled but no url in configuration block"); } http_output.options["url"] = url;