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 <cedric.bail@free.fr>
This commit is contained in:
Savio Sena 2014-05-07 00:18:42 +02:00 committed by Cedric Bail
parent 14d4700c32
commit e61004e30f
4 changed files with 12 additions and 13 deletions

View File

@ -177,10 +177,7 @@ void
convert_eolian_implements(efl::eolian::eo_class& cls, const char *classname) convert_eolian_implements(efl::eolian::eo_class& cls, const char *classname)
{ {
const Eina_List *it; const Eina_List *it;
void *curr;
std::string prefix(safe_str(eolian_class_eo_prefix_get(classname))); 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_; void *impl_desc_;
EINA_LIST_FOREACH(eolian_class_implements_list_get(classname), it, impl_desc_) EINA_LIST_FOREACH(eolian_class_implements_list_get(classname), it, impl_desc_)
{ {

View File

@ -37,7 +37,7 @@ _list_dir(const char *dir, const char *suffix, Eina_Bool recurse)
} }
inline Eina_List* 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)) if (eina_str_has_suffix(path, EO_SUFFIX))
{ {

View File

@ -108,14 +108,11 @@ std::pair<std::string, std::string> get_filename_info(std::string path)
return {filename, namespace_}; return {filename, namespace_};
} }
} }
else
{
return {path, std::string()}; return {path, std::string()};
}
} }
efl::eolian::eo_generator_options 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; 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()); efl::eolian::eo_class cls = ::c_to_cxx(classname.c_str());
cls.name_space = opts.name_space; cls.name_space = opts.name_space;
efl::eolian::eo_class_validate(cls); 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; std::string outname = (opts.out_file == "") ? (cls.name + ".eo.hh") : opts.out_file;
if (opts.out_dir != "") if (opts.out_dir != "")
@ -247,7 +244,7 @@ _load_classes(options_type const& opts)
{ {
for (auto src : opts.in_srcs) 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) EINA_CXX_DOM_LOG_WARN(::domain)
<< "Couldn't load eolian file: " << src; << "Couldn't load eolian file: " << src;

View File

@ -19,13 +19,18 @@ _isvalid(const std::string& name)
return name.size() > 0 and isalpha(name[0]); return name.size() > 0 and isalpha(name[0]);
} }
#ifdef DEBUG
inline void inline void
_dbg(const std::string& msg) _dbg(const std::string& msg)
{ {
#ifdef DEBUG
std::cerr << "eo_validate() - " << msg << std::endl; std::cerr << "eo_validate() - " << msg << std::endl;
#endif
} }
#else
inline void
_dbg(const std::string&)
{
}
#endif
inline void inline void
eo_class_validate(const eo_class& cls) eo_class_validate(const eo_class& cls)