summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-08-16 23:37:23 +0000
committerJens Arnold <amiconn@rockbox.org>2004-08-16 23:37:23 +0000
commitc76c568b351d37c485f78cd185b2d52d54fe7a34 (patch)
treeca65a23113fb82941855e44b5dcc3a0896885882
parent8b131ac1fb04cb96094044dca7423a8d1da7f690 (diff)
downloadrockbox-c76c568b351d37c485f78cd185b2d52d54fe7a34.tar.gz
rockbox-c76c568b351d37c485f78cd185b2d52d54fe7a34.zip
Const policed pointer arguments to functions, part 1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4995 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugin.h9
-rw-r--r--firmware/debug.c14
-rw-r--r--firmware/drivers/lcd-player.c2
-rw-r--r--firmware/drivers/lcd-recorder.c4
-rw-r--r--firmware/export/font.h2
-rw-r--r--firmware/export/id3.h4
-rw-r--r--firmware/export/kernel.h2
-rw-r--r--firmware/export/lcd.h4
-rw-r--r--firmware/export/mp3_playback.h2
-rw-r--r--firmware/export/mpeg.h4
-rw-r--r--firmware/export/panic.h2
-rw-r--r--firmware/font.c12
-rw-r--r--firmware/id3.c4
-rw-r--r--firmware/kernel.c2
-rw-r--r--firmware/mp3_playback.c2
-rw-r--r--firmware/mpeg.c8
-rw-r--r--firmware/panic.c2
-rw-r--r--firmware/rolo.c10
-rw-r--r--firmware/thread.c2
-rw-r--r--uisimulator/win32/kernel.c2
20 files changed, 48 insertions, 45 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 8ee2534372..d44aa7d60b 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -112,7 +112,7 @@ struct plugin_api {
112 /* lcd */ 112 /* lcd */
113 void (*lcd_clear_display)(void); 113 void (*lcd_clear_display)(void);
114 void (*lcd_puts)(int x, int y, const unsigned char *string); 114 void (*lcd_puts)(int x, int y, const unsigned char *string);
115 void (*lcd_puts_scroll)(int x, int y, unsigned char* string); 115 void (*lcd_puts_scroll)(int x, int y, const unsigned char* string);
116 void (*lcd_stop_scroll)(void); 116 void (*lcd_stop_scroll)(void);
117 void (*lcd_set_contrast)(int x); 117 void (*lcd_set_contrast)(int x);
118#ifdef HAVE_LCD_CHARCELLS 118#ifdef HAVE_LCD_CHARCELLS
@@ -211,7 +211,7 @@ struct plugin_api {
211 /* sound */ 211 /* sound */
212 void (*mpeg_sound_set)(int setting, int value); 212 void (*mpeg_sound_set)(int setting, int value);
213#ifndef SIMULATOR 213#ifndef SIMULATOR
214 void (*mp3_play_data)(unsigned char* start, int size, void (*get_more)(unsigned char** start, int* size)); 214 void (*mp3_play_data)(const unsigned char* start, int size, void (*get_more)(unsigned char** start, int* size));
215 void (*mp3_play_pause)(bool play); 215 void (*mp3_play_pause)(bool play);
216 void (*mp3_play_stop)(void); 216 void (*mp3_play_stop)(void);
217 bool (*mp3_is_playing)(void); 217 bool (*mp3_is_playing)(void);
@@ -264,7 +264,7 @@ struct plugin_api {
264#endif 264#endif
265 struct user_settings* global_settings; 265 struct user_settings* global_settings;
266 void (*backlight_set_timeout)(int index); 266 void (*backlight_set_timeout)(int index);
267 bool (*mp3info)(struct mp3entry *entry, char *filename, bool v1first); 267 bool (*mp3info)(struct mp3entry *entry, const char *filename, bool v1first);
268 int (*count_mp3_frames)(int fd, int startpos, int filesize, 268 int (*count_mp3_frames)(int fd, int startpos, int filesize,
269 void (*progressfunc)(int)); 269 void (*progressfunc)(int));
270 int (*create_xing_header)(int fd, int startpos, int filesize, 270 int (*create_xing_header)(int fd, int startpos, int filesize,
@@ -285,7 +285,8 @@ struct plugin_api {
285 int (*peak_meter_get_use_dbfs)(void); 285 int (*peak_meter_get_use_dbfs)(void);
286#endif 286#endif
287#ifdef HAVE_LCD_BITMAP 287#ifdef HAVE_LCD_BITMAP
288 void (*lcd_puts_scroll_style)(int x, int y, unsigned char* string, int style); 288 void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string,
289 int style);
289#endif 290#endif
290 void (*mpeg_flush_and_reload_tracks)(void); 291 void (*mpeg_flush_and_reload_tracks)(void);
291 int (*strncasecmp)(const char *s1, const char *s2, size_t n); 292 int (*strncasecmp)(const char *s1, const char *s2, size_t n);
diff --git a/firmware/debug.c b/firmware/debug.c
index 977ece3f5d..6a30c6076a 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -112,11 +112,11 @@ static char lowhex(int x)
112 return hexchars[x & 0xf]; 112 return hexchars[x & 0xf];
113} 113}
114 114
115static void putpacket (char *buffer) 115static void putpacket (const char *buffer)
116{ 116{
117 register int checksum; 117 register int checksum;
118 118
119 char *src = buffer; 119 const char *src = buffer;
120 120
121 /* Special debug hack. Shut off the Rx IRQ during I/O to prevent the debug 121 /* Special debug hack. Shut off the Rx IRQ during I/O to prevent the debug
122 stub from interrupting the message */ 122 stub from interrupting the message */
@@ -172,7 +172,7 @@ static void putpacket (char *buffer)
172 172
173/* convert the memory, pointed to by mem into hex, placing result in buf */ 173/* convert the memory, pointed to by mem into hex, placing result in buf */
174/* return a pointer to the last char put in buf (null) */ 174/* return a pointer to the last char put in buf (null) */
175static char *mem2hex (char *mem, char *buf, int count) 175static char *mem2hex (const char *mem, char *buf, int count)
176{ 176{
177 int i; 177 int i;
178 int ch; 178 int ch;
@@ -186,7 +186,7 @@ static char *mem2hex (char *mem, char *buf, int count)
186 return (buf); 186 return (buf);
187} 187}
188 188
189static void debug(char *msg) 189static void debug(const char *msg)
190{ 190{
191 debugbuf[0] = 'O'; 191 debugbuf[0] = 'O';
192 192
@@ -196,7 +196,7 @@ static void debug(char *msg)
196#endif /* end of DEBUG section */ 196#endif /* end of DEBUG section */
197 197
198#ifdef __GNUC__ 198#ifdef __GNUC__
199void debugf(char *fmt, ...) 199void debugf(const char *fmt, ...)
200#endif 200#endif
201{ 201{
202#ifdef DEBUG 202#ifdef DEBUG
@@ -218,7 +218,7 @@ void debug_init(void)
218{ 218{
219} 219}
220 220
221void debugf(char *fmt, ...) 221void debugf(const char *fmt, ...)
222{ 222{
223 va_list ap; 223 va_list ap;
224 va_start( ap, fmt ); 224 va_start( ap, fmt );
@@ -226,7 +226,7 @@ void debugf(char *fmt, ...)
226 va_end( ap ); 226 va_end( ap );
227} 227}
228 228
229void ldebugf(char* file, int line, char *fmt, ...) 229void ldebugf(const char* file, int line, const char *fmt, ...)
230{ 230{
231 va_list ap; 231 va_list ap;
232 va_start( ap, fmt ); 232 va_start( ap, fmt );
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c
index c948f49828..d4a523afe3 100644
--- a/firmware/drivers/lcd-player.c
+++ b/firmware/drivers/lcd-player.c
@@ -530,7 +530,7 @@ void lcd_bidir_scroll(int percent)
530 bidir_limit = percent; 530 bidir_limit = percent;
531} 531}
532 532
533void lcd_puts_scroll(int x, int y, unsigned char* string ) 533void lcd_puts_scroll(int x, int y, const unsigned char* string )
534{ 534{
535 struct scrollinfo* s; 535 struct scrollinfo* s;
536 int i; 536 int i;
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index 42cf016f97..a8dca92b4f 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -784,12 +784,12 @@ void lcd_invertpixel(int x, int y)
784 INVERT_PIXEL(x,y); 784 INVERT_PIXEL(x,y);
785} 785}
786 786
787void lcd_puts_scroll(int x, int y, unsigned char *string) 787void lcd_puts_scroll(int x, int y, const unsigned char *string)
788{ 788{
789 lcd_puts_scroll_style(x, y, string, STYLE_DEFAULT); 789 lcd_puts_scroll_style(x, y, string, STYLE_DEFAULT);
790} 790}
791 791
792void lcd_puts_scroll_style(int x, int y, unsigned char *string, int style) 792void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style)
793{ 793{
794 struct scrollinfo* s; 794 struct scrollinfo* s;
795 int w, h; 795 int w, h;
diff --git a/firmware/export/font.h b/firmware/export/font.h
index f2f83e54c8..14a683a5f2 100644
--- a/firmware/export/font.h
+++ b/firmware/export/font.h
@@ -103,7 +103,7 @@ struct font {
103 103
104/* font routines*/ 104/* font routines*/
105void font_init(void); 105void font_init(void);
106struct font* font_load(char *path); 106struct font* font_load(const char *path);
107struct font* font_get(int font); 107struct font* font_get(int font);
108void font_reset(void); 108void font_reset(void);
109 109
diff --git a/firmware/export/id3.h b/firmware/export/id3.h
index 10f8002db6..8a79cb0ce1 100644
--- a/firmware/export/id3.h
+++ b/firmware/export/id3.h
@@ -74,7 +74,7 @@ enum {
74 ID3_VER_2_4 74 ID3_VER_2_4
75}; 75};
76 76
77bool mp3info(struct mp3entry *entry, char *filename, bool v1first); 77bool mp3info(struct mp3entry *entry, const char *filename, bool v1first);
78char* id3_get_genre(struct mp3entry* id3); 78char* id3_get_genre(const struct mp3entry* id3);
79 79
80#endif 80#endif
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h
index 6e11baedf6..97994c41df 100644
--- a/firmware/export/kernel.h
+++ b/firmware/export/kernel.h
@@ -71,7 +71,7 @@ extern void queue_init(struct event_queue *q);
71extern void queue_wait(struct event_queue *q, struct event *ev); 71extern void queue_wait(struct event_queue *q, struct event *ev);
72extern void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks); 72extern void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks);
73extern void queue_post(struct event_queue *q, int id, void *data); 73extern void queue_post(struct event_queue *q, int id, void *data);
74extern bool queue_empty(struct event_queue* q); 74extern bool queue_empty(const struct event_queue* q);
75extern int queue_broadcast(int id, void *data); 75extern int queue_broadcast(int id, void *data);
76 76
77extern void mutex_init(struct mutex *m); 77extern void mutex_init(struct mutex *m);
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 6a7f8cf155..2a8a7ff0b1 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -35,8 +35,8 @@ extern void lcd_puts(int x, int y, const unsigned char *string);
35extern void lcd_puts_style(int x, int y, const unsigned char *string, int style); 35extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
36extern void lcd_putc(int x, int y, unsigned short ch); 36extern void lcd_putc(int x, int y, unsigned short ch);
37 37
38extern void lcd_puts_scroll(int x, int y, unsigned char* string ); 38extern void lcd_puts_scroll(int x, int y, const unsigned char* string );
39extern void lcd_puts_scroll_style(int x, int y, unsigned char* string, 39extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string,
40 int style); 40 int style);
41extern void lcd_icon(int icon, bool enable); 41extern void lcd_icon(int icon, bool enable);
42extern void lcd_stop_scroll(void); 42extern void lcd_stop_scroll(void);
diff --git a/firmware/export/mp3_playback.h b/firmware/export/mp3_playback.h
index 9eb1d882ff..12ef734bfe 100644
--- a/firmware/export/mp3_playback.h
+++ b/firmware/export/mp3_playback.h
@@ -51,7 +51,7 @@ void demand_irq_enable(bool on);
51 51
52/* new functions, exported to plugin API */ 52/* new functions, exported to plugin API */
53void mp3_play_init(void); 53void mp3_play_init(void);
54void mp3_play_data(unsigned char* start, int size, 54void mp3_play_data(const unsigned char* start, int size,
55 void (*get_more)(unsigned char** start, int* size) /* callback fn */ 55 void (*get_more)(unsigned char** start, int* size) /* callback fn */
56); 56);
57void mp3_play_pause(bool play); 57void mp3_play_pause(bool play);
diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h
index bf16a2ac73..3088dc5ffd 100644
--- a/firmware/export/mpeg.h
+++ b/firmware/export/mpeg.h
@@ -77,8 +77,8 @@ int mpeg_status(void);
77#if defined(HAVE_MAS3587F) || defined(SIMULATOR) 77#if defined(HAVE_MAS3587F) || defined(SIMULATOR)
78void mpeg_init_recording(void); 78void mpeg_init_recording(void);
79void mpeg_init_playback(void); 79void mpeg_init_playback(void);
80void mpeg_record(char *filename); 80void mpeg_record(const char *filename);
81void mpeg_new_file(char *filename); 81void mpeg_new_file(const char *filename);
82void mpeg_set_recording_options(int frequency, int quality, 82void mpeg_set_recording_options(int frequency, int quality,
83 int source, int channel_mode, 83 int source, int channel_mode,
84 bool editable, int prerecord_time); 84 bool editable, int prerecord_time);
diff --git a/firmware/export/panic.h b/firmware/export/panic.h
index 585f827927..fd63687606 100644
--- a/firmware/export/panic.h
+++ b/firmware/export/panic.h
@@ -20,6 +20,6 @@
20#ifndef __PANIC_H__ 20#ifndef __PANIC_H__
21#define __PANIC_H__ 21#define __PANIC_H__
22 22
23void panicf( char *fmt, ... ); 23void panicf( const char *fmt, ... );
24 24
25#endif /* __PANIC_H__ */ 25#endif /* __PANIC_H__ */
diff --git a/firmware/font.c b/firmware/font.c
index f33490869a..343dd0b278 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -53,9 +53,9 @@ static unsigned char *freeptr = mbuf;
53static unsigned char *fileptr; 53static unsigned char *fileptr;
54static unsigned char *eofptr; 54static unsigned char *eofptr;
55 55
56static void rotate_font_bits(struct font* pf); 56static void rotate_font_bits(const struct font* pf);
57static void rotleft(unsigned char *dst, 57static void rotleft(unsigned char *dst,
58 bitmap_t *src, 58 const bitmap_t *src,
59 unsigned int width, 59 unsigned int width,
60 unsigned int height); 60 unsigned int height);
61 61
@@ -120,7 +120,7 @@ void font_reset(void)
120} 120}
121 121
122/* read and load font into incore font structure*/ 122/* read and load font into incore font structure*/
123struct font* font_load(char *path) 123struct font* font_load(const char *path)
124{ 124{
125 int fd, filesize; 125 int fd, filesize;
126 unsigned short maxwidth, height, ascent, pad; 126 unsigned short maxwidth, height, ascent, pad;
@@ -263,7 +263,7 @@ struct font* font_get(int font)
263} 263}
264 264
265/* convert font bitmap data inplace to rockbox format*/ 265/* convert font bitmap data inplace to rockbox format*/
266static void rotate_font_bits(struct font* pf) 266static void rotate_font_bits(const struct font* pf)
267{ 267{
268 int i; 268 int i;
269 unsigned long defaultchar = pf->defaultchar - pf->firstchar; 269 unsigned long defaultchar = pf->defaultchar - pf->firstchar;
@@ -305,8 +305,8 @@ static void rotate_font_bits(struct font* pf)
305 * Doing it this way keeps fonts in standard formats, 305 * Doing it this way keeps fonts in standard formats,
306 * as well as keeping Rockbox hw bitmap format. 306 * as well as keeping Rockbox hw bitmap format.
307 */ 307 */
308static void rotleft(unsigned char *dst, bitmap_t *src, unsigned int width, 308static void rotleft(unsigned char *dst, const bitmap_t *src,
309 unsigned int height) 309 unsigned int width, unsigned int height)
310{ 310{
311 unsigned int i,j; 311 unsigned int i,j;
312 unsigned int src_words; /* # words of input image*/ 312 unsigned int src_words; /* # words of input image*/
diff --git a/firmware/id3.c b/firmware/id3.c
index 0a08fa0de8..4297c8ba70 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -77,7 +77,7 @@ static const char* const genres[] = {
77 "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall" 77 "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall"
78}; 78};
79 79
80char* id3_get_genre(struct mp3entry* id3) 80char* id3_get_genre(const struct mp3entry* id3)
81{ 81{
82 if( id3->genre_string ) 82 if( id3->genre_string )
83 return id3->genre_string ; 83 return id3->genre_string ;
@@ -799,7 +799,7 @@ static int getsonglength(int fd, struct mp3entry *entry)
799 * about an MP3 file and updates it's entry accordingly. 799 * about an MP3 file and updates it's entry accordingly.
800 * 800 *
801 */ 801 */
802bool mp3info(struct mp3entry *entry, char *filename, bool v1first) 802bool mp3info(struct mp3entry *entry, const char *filename, bool v1first)
803{ 803{
804 int fd; 804 int fd;
805 int v1found = false; 805 int v1found = false;
diff --git a/firmware/kernel.c b/firmware/kernel.c
index ec2c149cc5..2cb87ccbc9 100644
--- a/firmware/kernel.c
+++ b/firmware/kernel.c
@@ -126,7 +126,7 @@ void queue_post(struct event_queue *q, int id, void *data)
126 set_irq_level(oldlevel); 126 set_irq_level(oldlevel);
127} 127}
128 128
129bool queue_empty(struct event_queue* q) 129bool queue_empty(const struct event_queue* q)
130{ 130{
131 return ( q->read == q->write ); 131 return ( q->read == q->write );
132} 132}
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c
index 1d4f77bf41..8159c4504c 100644
--- a/firmware/mp3_playback.c
+++ b/firmware/mp3_playback.c
@@ -1059,7 +1059,7 @@ void mp3_play_init(void)
1059 mp3_reset_playtime(); 1059 mp3_reset_playtime();
1060} 1060}
1061 1061
1062void mp3_play_data(unsigned char* start, int size, 1062void mp3_play_data(const unsigned char* start, int size,
1063 void (*get_more)(unsigned char** start, int* size) /* callback fn */ 1063 void (*get_more)(unsigned char** start, int* size) /* callback fn */
1064) 1064)
1065{ 1065{
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index c6afbd8e6c..bfcdfc1c0c 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -803,7 +803,7 @@ static void transfer_end(unsigned char** ppbuf, int* psize)
803 wake_up_thread(); 803 wake_up_thread();
804} 804}
805 805
806static int add_track_to_tag_list(char *filename) 806static int add_track_to_tag_list(const char *filename)
807{ 807{
808 struct id3tag *t = NULL; 808 struct id3tag *t = NULL;
809 int i; 809 int i;
@@ -938,7 +938,7 @@ static void track_change(void)
938} 938}
939 939
940#ifdef DEBUG 940#ifdef DEBUG
941void hexdump(unsigned char *buf, int len) 941void hexdump(const unsigned char *buf, int len)
942{ 942{
943 int i; 943 int i;
944 944
@@ -2167,7 +2167,7 @@ static void init_recording(void)
2167 call mpeg_set_recording_options(). */ 2167 call mpeg_set_recording_options(). */
2168} 2168}
2169 2169
2170void mpeg_record(char *filename) 2170void mpeg_record(const char *filename)
2171{ 2171{
2172 mpeg_errno = 0; 2172 mpeg_errno = 0;
2173 2173
@@ -2396,7 +2396,7 @@ void mpeg_set_recording_gain(int left, int right, bool use_mic)
2396 0x0007); 2396 0x0007);
2397} 2397}
2398 2398
2399void mpeg_new_file(char *filename) 2399void mpeg_new_file(const char *filename)
2400{ 2400{
2401 mpeg_errno = 0; 2401 mpeg_errno = 0;
2402 2402
diff --git a/firmware/panic.c b/firmware/panic.c
index df8afdfda3..147ee6292e 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -31,7 +31,7 @@ static char panic_buf[128];
31/* 31/*
32 * "Dude. This is pretty fucked-up, right here." 32 * "Dude. This is pretty fucked-up, right here."
33 */ 33 */
34void panicf( char *fmt, ...) 34void panicf( const char *fmt, ...)
35{ 35{
36 va_list ap; 36 va_list ap;
37 37
diff --git a/firmware/rolo.c b/firmware/rolo.c
index c5cfc5d77b..d78078cdd7 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -30,7 +30,7 @@
30 30
31#define IRQ0_EDGE_TRIGGER 0x80 31#define IRQ0_EDGE_TRIGGER 0x80
32 32
33static void rolo_error(char *text) 33static void rolo_error(const char *text)
34{ 34{
35 lcd_clear_display(); 35 lcd_clear_display();
36 lcd_puts(0, 0, "ROLO error:"); 36 lcd_puts(0, 0, "ROLO error:");
@@ -43,8 +43,10 @@ static void rolo_error(char *text)
43} 43}
44 44
45/* these are in assembler file "descramble.S" */ 45/* these are in assembler file "descramble.S" */
46extern unsigned short descramble(unsigned char* source, unsigned char* dest, int length); 46extern unsigned short descramble(const unsigned char* source,
47extern void rolo_restart(unsigned char* source, unsigned char* dest, int length); 47 unsigned char* dest, int length);
48extern void rolo_restart(const unsigned char* source, unsigned char* dest,
49 int length);
48 50
49/*************************************************************************** 51/***************************************************************************
50 * 52 *
@@ -52,7 +54,7 @@ extern void rolo_restart(unsigned char* source, unsigned char* dest, int length)
52 * Filename must be a fully defined filename including the path and extension 54 * Filename must be a fully defined filename including the path and extension
53 * 55 *
54 ***************************************************************************/ 56 ***************************************************************************/
55int rolo_load(char* filename) 57int rolo_load(const char* filename)
56{ 58{
57 int fd; 59 int fd;
58 unsigned long length; 60 unsigned long length;
diff --git a/firmware/thread.c b/firmware/thread.c
index 7490833863..df90c7ac2f 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -71,7 +71,7 @@ static inline void store_context(void* addr)
71 * Load non-volatile context. 71 * Load non-volatile context.
72 *--------------------------------------------------------------------------- 72 *---------------------------------------------------------------------------
73 */ 73 */
74static inline void load_context(void* addr) 74static inline void load_context(const void* addr)
75{ 75{
76 asm volatile ("mov.l @%0+,r8\n\t" 76 asm volatile ("mov.l @%0+,r8\n\t"
77 "mov.l @%0+,r9\n\t" 77 "mov.l @%0+,r9\n\t"
diff --git a/uisimulator/win32/kernel.c b/uisimulator/win32/kernel.c
index 77ae6bffb2..b7c4af1eb1 100644
--- a/uisimulator/win32/kernel.c
+++ b/uisimulator/win32/kernel.c
@@ -94,7 +94,7 @@ void queue_post(struct event_queue *q, int id, void *data)
94 set_irq_level(oldlevel); 94 set_irq_level(oldlevel);
95} 95}
96 96
97bool queue_empty(struct event_queue* q) 97bool queue_empty(const struct event_queue* q)
98{ 98{
99 return ( q->read == q->write ); 99 return ( q->read == q->write );
100} 100}