From mint-bounce@lists.fishpool.fi Thu Feb 28 06:46:48 2008 X-Virus-Scanned: amavisd-new at demon.co.uk Subject: [MiNT] some mintlib warning fixes From: Alan Hourihane To: mint Content-Type: multipart/mixed; boundary="=-aDY8rRKHWpu/JD09AY20" Date: Thu, 28 Feb 2008 11:38:11 +0000 Message-Id: <1204198692.12165.0.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: alanh@fairlite.demon.co.uk Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: --=-aDY8rRKHWpu/JD09AY20 Content-Type: text/plain Content-Transfer-Encoding: 7bit Attached. Alan. --=-aDY8rRKHWpu/JD09AY20 Content-Disposition: attachment; filename=mintlib-warning.patch Content-Type: text/x-patch; name=mintlib-warning.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: mintlib/ctype.c =================================================================== RCS file: /mint/mintlib/mintlib/ctype.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 ctype.c --- mintlib/ctype.c 12 Oct 2000 10:56:40 -0000 1.1.1.1 +++ mintlib/ctype.c 28 Feb 2008 11:34:22 -0000 @@ -20,7 +20,7 @@ /* some code uses these as function pointers -- i */ /* have seen code that does. */ -static int _myctype[UCHAR_MAX + 1] = +static unsigned int _myctype[UCHAR_MAX + 1] = { 0, /* EOF */ _CTc, _CTc, _CTc, _CTc, /* 0x00..0x03 */ Index: mintlib/do_fstat.c =================================================================== RCS file: /mint/mintlib/mintlib/do_fstat.c,v retrieving revision 1.3 diff -u -r1.3 do_fstat.c --- mintlib/do_fstat.c 8 Oct 2003 15:23:14 -0000 1.3 +++ mintlib/do_fstat.c 28 Feb 2008 11:34:22 -0000 @@ -35,8 +35,6 @@ r = Fcntl (fd, &xattr, FSTAT); if (r == 0) { - unsigned short *ptr; - __bzero (st, sizeof (*st)); st->st_dev = (dev_t) xattr.st_dev; @@ -48,12 +46,13 @@ st->st_rdev = (dev_t) xattr.st_rdev; if (exact) { - ptr = (unsigned short *) &xattr.st_mtime; - st->st_mtime = __unixtime (ptr[0], ptr[1]); - ptr = (unsigned short *) &xattr.st_atime; - st->st_atime = __unixtime (ptr[0], ptr[1]); - ptr = (unsigned short *) &xattr.st_ctime; - st->st_ctime = __unixtime (ptr[0], ptr[1]); + union { unsigned short s[2]; unsigned long l; } data; + data.l = xattr.st_mtime; + st->st_mtime = __unixtime (data.s[0], data.s[1]); + data.l = xattr.st_atime; + st->st_atime = __unixtime (data.s[0], data.s[1]); + data.l = xattr.st_ctime; + st->st_ctime = __unixtime (data.s[0], data.s[1]); } st->st_size = (off_t) xattr.st_size; --=-aDY8rRKHWpu/JD09AY20--