From 7702d7e43d65197d961dd6097785c880b9e213f4 Mon Sep 17 00:00:00 2001 From: chakradhar Date: Wed, 8 Jan 2020 19:36:51 +0530 Subject: [PATCH] [Tizen 6.0] Enable build with GCC 9.2 Change-Id: I318114a821e23db4d1c6112ba3b9e4316e3d720a --- tools/cpp/src/cpp-build/generate_geocoding_data.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/cpp/src/cpp-build/generate_geocoding_data.cc b/tools/cpp/src/cpp-build/generate_geocoding_data.cc index 22ae38e..c720b43 100644 --- a/tools/cpp/src/cpp-build/generate_geocoding_data.cc +++ b/tools/cpp/src/cpp-build/generate_geocoding_data.cc @@ -399,10 +399,14 @@ void WritePrefixesDescriptions(const map& prefix_var_names, "};\n" "\n" "const PrefixDescriptions* prefixes_descriptions[] = {\n"); +if(prefix_var_names.size() > 0) { for (map::const_iterator it = prefix_var_names.begin(); it != prefix_var_names.end(); ++it) { fprintf(output, " &%s,\n", it->second.c_str()); } +}else{ + fprintf(output, "%s", "0"); +} fprintf(output, "};\n" "\n"); @@ -466,14 +470,15 @@ bool WriteCountryLanguages(const map >& languages, countries.push_back(country_code); } - fprintf(output, - "\n" - "const CountryLanguages* countries_languages[] = {\n"); - for (vector::const_iterator - it_languages_var = country_languages_vars.begin(); + fprintf(output, "\n" "const CountryLanguages* countries_languages[] = {\n"); + if( country_languages_vars.size() > 0) { + for (vector::const_iterator it_languages_var = country_languages_vars.begin(); it_languages_var != country_languages_vars.end(); ++it_languages_var) { fprintf(output, " &%s,\n", it_languages_var->c_str()); } +}else{ + fprintf(output, "%s", "0"); +} fprintf(output, "};\n" "\n" -- 2.7.4