Mercurial > emacs
changeset 75217:9e5c071deb9f
(Fuser_uid, Fuser_real_uid): Copy values returned by geteuid and getuid
into EMACS_INT to avoid GCC warnings.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 13 Jan 2007 21:46:02 +0000 |
parents | 4ffeb7d1d7ba |
children | 6a5ce97ea40d |
files | src/editfns.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/editfns.c Sat Jan 13 21:45:34 2007 +0000 +++ b/src/editfns.c Sat Jan 13 21:46:02 2007 +0000 @@ -1314,7 +1314,10 @@ Value is an integer or float, depending on the value. */) () { - return make_fixnum_or_float (geteuid ()); + /* Assignment to EMACS_INT stops GCC whining about limited range of + data type. */ + EMACS_INT euid = geteuid (); + return make_fixnum_or_float (euid); } DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, @@ -1322,7 +1325,10 @@ Value is an integer or float, depending on the value. */) () { - return make_fixnum_or_float (getuid ()); + /* Assignment to EMACS_INT stops GCC whining about limited range of + data type. */ + EMACS_INT uid = getuid (); + return make_fixnum_or_float (uid); } DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0,