diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-12-10 22:38:34 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-12-10 22:38:34 -0800 |
commit | 816ae0e04d0d189adb2da13007b6f6e3d53ae03c (patch) | |
tree | 4b1d2dc668b3d2d633d4d63667815b465758991a | |
parent | ef0068345c2b82347e7b5ed319266c11c38f690e (diff) |
Move domaindir declaration inside #ifdef USE_GETTEXT
Avoid unused variable warnings if USE_GETTEXT is undefined
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xfd.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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); |