From 1188f933aa2cff23ef8f56baa52cd4f3e1048f47 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 8 May 2005 22:11:15 +0000 Subject: 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 --- apps/recorder/bmp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index 6b557783cf..e55c2f9d1e 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c @@ -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); -- cgit v1.2.3