From 816ae0e04d0d189adb2da13007b6f6e3d53ae03c Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 10 Dec 2013 22:38:34 -0800 Subject: Move domaindir declaration inside #ifdef USE_GETTEXT Avoid unused variable warnings if USE_GETTEXT is undefined Signed-off-by: Alan Coopersmith --- xfd.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xfd.c b/xfd.c index 3ffd84a..c339acf 100644 --- a/xfd.c +++ b/xfd.c @@ -183,7 +183,6 @@ main(int argc, char *argv[]) XftFont *xft; #endif char *fontname; - const char *domaindir; long minn, maxn; XtSetLanguageProc(NULL, NULL, NULL); @@ -195,13 +194,17 @@ main(int argc, char *argv[]) &argc, argv, NULL, NULL, 0); #ifdef USE_GETTEXT - textdomain("xfd"); + { + const char *domaindir; + + textdomain("xfd"); - /* mainly for debugging */ - if ((domaindir = getenv ("TEXTDOMAINDIR")) == NULL) { - domaindir = LOCALEDIR; + /* mainly for debugging */ + if ((domaindir = getenv ("TEXTDOMAINDIR")) == NULL) { + domaindir = LOCALEDIR; + } + bindtextdomain ("xfd", domaindir); } - bindtextdomain ("xfd", domaindir); #endif Resources[0].default_addr = gettext(DEF_SELECT_FORMAT); -- cgit v1.2.3