Subject: Question about some BIOS code

From: Francois Desloges <[email-masked]>
Date: Tue, 2 Nov 1999 16:45:00 -0400

Building Russels BIOS, I ended up with this strange
warning I wasn't able to figure out the cause of: 

>string.h:17: warning: conflicting types for built-in function `memset'

Here is the appropriate section of string.h:

>typedef unsigned long size_t;
>
>extern void *memzero(void *ptr, int size);
>
>extern void *memset(void *ptr, int byte, size_t size);
>
>extern int memeq(const void *m1, const void *m2, size_t size);

I know this is probably not important. But it just obsesses me for two days now,
every time I see it passing while I build the BIOS.

Anybody knows?

-- 
François Desloges
[email-masked]
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 2 Nov 1999 22:17:50 +0000 (GMT)

> every time I see it passing while I build the BIOS.

It's a mismatch between what the compiler thinks the arguments should be to
memset() and what I'd like them to be.  Some (newer) versions of GCC have
a version of memset() built into them.  However, the warning is harmless 
in this case, and probably should be fixed.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Paul Koning <[email-masked]>
Date: Tue, 2 Nov 1999 18:11:00 -0500

> in this case, and probably should be fixed.

Perhaps the compiler want size_t to be unsigned int, rather than
unsigned long?  Even if they are the same size they are, I think,
distinct types.

	paul

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 3 Nov 1999 15:33:35 +0000 (GMT)

> unsigned long?  Even if they are the same size they are, I think,

I think actually it may be a signed type.
   _____

---

From: Paul Koning <[email-masked]>
Date: Wed, 3 Nov 1999 12:25:04 -0500

>>>>> "Russell" == Russell King <- ARM Linux Admin <[email-masked]>> writes:

 >> unsigned long?  Even if they are the same size they are, I think,

 Russell> I think actually it may be a signed type. 

Eek.  Unsigned int vs. unsigned long is a small difference in detail,
but making size_t a signed type would rather obviously be an error.

I suppose the theing to do would be to dig into the gcc sources and
find out what it did...

	paul

---

From: Philip Blundell <[email-masked]>
Date: Wed, 03 Nov 1999 17:10:37 +0000

In message <[email-masked]>, Russell King - AR
>I think actually it may be a signed type.

No, that's ssize_t.  Gcc makes size_t `unsigned int' on ARM GNU/Linux systems; 
I vaguely recall that it used to be `unsigned long', but I could be wrong 
about that.

p.