[Tizen 6.0] Enable build with GCC 9.2 73/221973/1 accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_7.0_unified_hotfix tizen_6.0_hotfix tizen_6.5 tizen_7.0_hotfix accepted/tizen/6.0/unified/20201030.105716 accepted/tizen/6.0/unified/hotfix/20201102.234802 accepted/tizen/6.0/unified/hotfix/20201103.045946 accepted/tizen/6.5/unified/20211029.013909 accepted/tizen/7.0/unified/20221110.062001 accepted/tizen/7.0/unified/hotfix/20221116.111017 accepted/tizen/unified/20200113.130620 submit/tizen/20200109.041556 submit/tizen/20200110.053620 submit/tizen_6.0/20201029.205502 submit/tizen_6.0_hotfix/20201102.192902 submit/tizen_6.0_hotfix/20201103.115102 submit/tizen_6.5/20211028.163501 tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release
authorchakradhar <v.pogiri@samsung.com>
Wed, 8 Jan 2020 14:06:51 +0000 (19:36 +0530)
committerchakradhar <v.pogiri@samsung.com>
Wed, 8 Jan 2020 14:06:51 +0000 (19:36 +0530)
Change-Id: I318114a821e23db4d1c6112ba3b9e4316e3d720a

tools/cpp/src/cpp-build/generate_geocoding_data.cc

index 22ae38e..c720b43 100644 (file)
@@ -399,10 +399,14 @@ void WritePrefixesDescriptions(const map<string, string>& prefix_var_names,
           "};\n"
           "\n"
           "const PrefixDescriptions* prefixes_descriptions[] = {\n");
+if(prefix_var_names.size() > 0) {
   for (map<string, string>::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<int32, set<string> >& languages,
     countries.push_back(country_code);
   }
 
-  fprintf(output,
-          "\n"
-          "const CountryLanguages* countries_languages[] = {\n");
-  for (vector<string>::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<string>::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"