From: Bruno Haible Date: Sat, 17 Mar 2007 11:21:39 +0000 (+0000) Subject: Avoid warnings. X-Git-Tag: v0.17~450 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3885e33b05c14c50cb3d7ef10f12b34d3e35fc1;p=thirdparty%2Fgettext.git Avoid warnings. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 8a4aa9d6a..815854309 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,7 @@ +2007-03-10 Bruno Haible + + * msginit.c (get_user_fullname): Reduce scope of local variables. + 2007-03-04 Bruno Haible Moved --enable-relocatable infrastructure to gnulib. diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index 248a4497b..141e51529 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -1003,14 +1003,15 @@ static const char * get_user_fullname () { struct passwd *pwd; - const char *fullname; - const char *fullname_end; - char *result; pwd = get_user_pwd (); #if HAVE_PWD_H if (pwd != NULL) { + const char *fullname; + const char *fullname_end; + char *result; + /* Return the pw_gecos field, upto the first comma (if any). */ fullname = pwd->pw_gecos; fullname_end = strchr (fullname, ',');