Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g.proj: Fix -Wembedded-directive compiler warnings #2877

Merged
merged 2 commits into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions general/g.proj/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ int main(int argc, char *argv[])
dontprettify = G_define_flag();
dontprettify->key = 'f';
dontprettify->guisection = _("Print");
dontprettify->description =
_("Print 'flat' output with no linebreaks (applies to "
#ifdef HAVE_OGR
"WKT and "
dontprettify->description = _("Print 'flat' output with no linebreaks "
"(applies to WKT and PROJ.4 output)");
#else
dontprettify->description =
_("Print 'flat' output with no linebreaks (applies to PROJ.4 output)");
#endif
"PROJ.4 output)");

#ifdef HAVE_OGR
printwkt = G_define_flag();
Expand Down Expand Up @@ -310,19 +311,19 @@ int main(int argc, char *argv[])
(printwkt->answer ? 1 : 0) +
#endif
(create->answer ? 1 : 0));
if (formats > 1)
G_fatal_error(_("Only one of -%c, -%c, -%c, -%c"
if (formats > 1) {
#ifdef HAVE_OGR
", -%c"
#endif
G_fatal_error(_("Only one of -%c, -%c, -%c, -%c, -%c"
" or -%c flags may be specified"),
printinfo->key, shellinfo->key, datuminfo->key,
printproj4->key,
#ifdef HAVE_OGR
printwkt->key,
printproj4->key, printwkt->key, create->key);
#else
G_fatal_error(_("Only one of -%c, -%c, -%c, -%c"
" or -%c flags may be specified"),
printinfo->key, shellinfo->key, datuminfo->key,
printproj4->key, create->key);
#endif
create->key);

}
if (printinfo->answer || shellinfo->answer)
print_projinfo(shellinfo->answer);
else if (datuminfo->answer)
Expand Down