Hi
Attached is a patch I did earlier, while working on something else. I noticed that SeaBIOS's memset() implementation casts the object "s" to (char *), which is technically incorrect; see:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/memset.html
It says:
The memset() function shall copy c (converted to an unsigned char) into each of the first n bytes of the object pointed to by s.
The attached patch fixes this, by casting c to unsigned char, and accordingly, casts void *s to (unsigned char *)
The current cast does (char *) which is technically incorrect, because whether char is signed or unsigned is implementation-defined, so you have to explicitly state signed or unsigned when signedness matters.