Made it build warning-free on the sim. This could not have worked in the sim

previously. Made readshort() and readlong() static.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6444 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2005-05-08 22:11:15 +00:00
parent ed5b06b04c
commit 1188f933aa

View file

@ -61,17 +61,17 @@ struct Fileheader {
#ifdef ROCKBOX_LITTLE_ENDIAN
#define readshort(x) x
#define readlong(x) x
#define readshort(x) *(x)
#define readlong(x) *(x)
#else
/* Endian functions */
short readshort(void* value) {
/* big endian functions */
static short readshort(short *value) {
unsigned char* bytes = (unsigned char*) value;
return bytes[0] | (bytes[1] << 8);
}
long readlong(void* value) {
static long readlong(long *value) {
unsigned char* bytes = (unsigned char*) value;
return (long)bytes[0] | ((long)bytes[1] << 8) |
((long)bytes[2] << 16) | ((long)bytes[3] << 24);