From e61004e30f1e5caab9e0679bb26849e409e5dd75 Mon Sep 17 00:00:00 2001 From: Savio Sena Date: Wed, 7 May 2014 00:18:42 +0200 Subject: [PATCH] eolian_cxx: remove warnings from bin and lib. Reviewers: cedric, smohanty, stefan_schmidt, stefan CC: felipealmeida, cedric Differential Revision: https://phab.enlightenment.org/D826 Signed-off-by: Cedric Bail --- src/bin/eolian_cxx/convert.cc | 3 --- src/bin/eolian_cxx/eo_read.h | 2 +- src/bin/eolian_cxx/eolian_cxx.cc | 11 ++++------- src/lib/eolian_cxx/eo_validate.hh | 9 +++++++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc index 6672daa54f..306ddc10c2 100644 --- a/src/bin/eolian_cxx/convert.cc +++ b/src/bin/eolian_cxx/convert.cc @@ -177,10 +177,7 @@ void convert_eolian_implements(efl::eolian::eo_class& cls, const char *classname) { const Eina_List *it; - void *curr; std::string prefix(safe_str(eolian_class_eo_prefix_get(classname))); - const Eina_List *implements = eolian_class_implements_list_get(classname); - Eolian_Implement impl_desc; void *impl_desc_; EINA_LIST_FOREACH(eolian_class_implements_list_get(classname), it, impl_desc_) { diff --git a/src/bin/eolian_cxx/eo_read.h b/src/bin/eolian_cxx/eo_read.h index 2ad332f410..57b5214252 100644 --- a/src/bin/eolian_cxx/eo_read.h +++ b/src/bin/eolian_cxx/eo_read.h @@ -37,7 +37,7 @@ _list_dir(const char *dir, const char *suffix, Eina_Bool recurse) } inline Eina_List* -eolian_read_from_fs(const char *path, Eina_Bool recurse) +eolian_read_from_fs(const char *path) { if (eina_str_has_suffix(path, EO_SUFFIX)) { diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc index 863caf3025..2ec77fbbaa 100644 --- a/src/bin/eolian_cxx/eolian_cxx.cc +++ b/src/bin/eolian_cxx/eolian_cxx.cc @@ -108,14 +108,11 @@ std::pair get_filename_info(std::string path) return {filename, namespace_}; } } - else - { - return {path, std::string()}; - } + return {path, std::string()}; } efl::eolian::eo_generator_options -_resolve_includes(std::string const& classname, ::options_type const& opts) +_resolve_includes(std::string const& classname) { efl::eolian::eo_generator_options gen_opts; @@ -156,7 +153,7 @@ _generate(const std::string classname, ::options_type const& opts) efl::eolian::eo_class cls = ::c_to_cxx(classname.c_str()); cls.name_space = opts.name_space; efl::eolian::eo_class_validate(cls); - efl::eolian::eo_generator_options gen_opts = _resolve_includes(classname, opts); + efl::eolian::eo_generator_options gen_opts = _resolve_includes(classname); std::string outname = (opts.out_file == "") ? (cls.name + ".eo.hh") : opts.out_file; if (opts.out_dir != "") @@ -247,7 +244,7 @@ _load_classes(options_type const& opts) { for (auto src : opts.in_srcs) { - if (eolian_read_from_fs(src.c_str(), opts.recurse) == NULL) + if (eolian_read_from_fs(src.c_str()) == NULL) { EINA_CXX_DOM_LOG_WARN(::domain) << "Couldn't load eolian file: " << src; diff --git a/src/lib/eolian_cxx/eo_validate.hh b/src/lib/eolian_cxx/eo_validate.hh index 9e5342d55d..9345ddb0dc 100644 --- a/src/lib/eolian_cxx/eo_validate.hh +++ b/src/lib/eolian_cxx/eo_validate.hh @@ -19,13 +19,18 @@ _isvalid(const std::string& name) return name.size() > 0 and isalpha(name[0]); } +#ifdef DEBUG inline void _dbg(const std::string& msg) { -#ifdef DEBUG std::cerr << "eo_validate() - " << msg << std::endl; -#endif } +#else +inline void +_dbg(const std::string&) +{ +} +#endif inline void eo_class_validate(const eo_class& cls)