Date: Thu, 01 May 2003 11:06:45 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: hackers@freebsd.org Subject: RE: incorrect enum warning? Message-ID: <XFMail.20030501110645.jhb@FreeBSD.org> In-Reply-To: <xzp7k9a67pf.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01-May-2003 Dag-Erling Smorgrav wrote: > Why does the following code in OpenPAM headers: > > /* > * XSSO 5.4 > */ > enum { > PAM_SILENT = 0x80000000, > PAM_DISALLOW_NULL_AUTHTOK = 0x1, > PAM_ESTABLISH_CRED = 0x1, > PAM_DELETE_CRED = 0x2, > PAM_REINITIALIZE_CRED = 0x4, > PAM_REFRESH_CRED = 0x8, > PAM_PRELIM_CHECK = 0x1, > PAM_UPDATE_AUTHTOK = 0x2, > PAM_CHANGE_EXPIRED_AUTHTOK = 0x4 > }; > > cause the following warning when compiled with CSTD=c99: > > /usr/src/contrib/openpam/include/security/pam_constants.h:100: warning: ISO C restricts > enumerator values to range of `int' > > when 0x80000000 is clearly within the range of 'int' on all platforms > we support? On an i386: #define INT_MAX 0x7fffffff /* max value for an int */ 0x80000000 > 0x7fffffff -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030501110645.jhb>