Skip to content

Commit f5a6232

Browse files
author
Marek
committed
Fixed some compile warnings
1 parent 726cd9a commit f5a6232

7 files changed

Lines changed: 21 additions & 23 deletions

File tree

‎arm/arm.c‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ void map(ArmGlobals *g, UInt32 phys, UInt32 virt);
4040
unsigned long arm_entry(const void *emulStateP, char *userData68KP,
4141
Call68KFuncType * call68KFuncP)
4242
{
43-
int i;
44-
4543
ArmStack *stack = (ArmStack *) userData68KP;
4644
ArmGlobals *g;
4745
UInt32 func;
@@ -105,7 +103,7 @@ Err HALDisplayGetAttributes(UInt16 attr, UInt32 *valueP);
105103

106104
UInt32 foobar()
107105
{
108-
UInt32 val='wtf\0';
106+
UInt32 val=('w'<<24)|('t'<<16)|('f'<<8)|'\0';
109107
void *old, *fptr;
110108
// depth = 16
111109
// videorambase = 0x50000000
@@ -175,30 +173,29 @@ int decode_bpp(UInt32 lccr3)
175173
*/
176174
UInt32 fb_test(ArmGlobals *g)
177175
{
178-
UInt32 lccr1 = reg(LCCR1);
176+
/* UInt32 lccr1 = reg(LCCR1);
179177
UInt32 lccr2 = reg(LCCR2);
180-
UInt32 lccr3 = reg(LCCR3);
178+
*/ UInt32 lccr3 = reg(LCCR3);
181179

182-
UInt32 w = (lccr1 & 0x3ff) + 1;
183-
UInt32 h = (lccr2 & 0x3ff) + 1;
184180
UInt32 bpp = decode_bpp(lccr3);
181+
/* UInt32 w = (lccr1 & 0x3ff) + 1;
182+
UInt32 h = (lccr2 & 0x3ff) + 1;
185183
UInt32 len = w * h * bpp / 8;
186184
187185
int alldead;
188-
186+
*/
189187
/* older devices use 8-bit & palette, what do we do for them? */
190188
if(bpp != 16) {
191189
return 0xbadfb000 | bpp;
192190
}
193191

194-
void *fb_base = (void*) reg( reg(FDADR0) + DMA_SRC);
192+
/* void *fb_base = (void*) reg( reg(FDADR0) + DMA_SRC);
195193
void *fb_end = fb_base + len;
194+
*/
196195

197-
198-
UInt16 i=0;
199-
UInt16 *j=0;
200196
irq_off();
201-
/*
197+
/* UInt16 i=0;
198+
UInt16 *j=0;
202199
for(i=0; i<0xff; i++) {
203200
alldead = 1;
204201
for(j = fb_base; (void*)j < fb_end; j++) {

‎arm/atag.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static void setup_core_tag(struct atag **params, void * address,long pagesize)
139139

140140
*params = tag_next(*params); /* move pointer to next tag */
141141
}
142-
142+
#if 0
143143
static void
144144
setup_ramdisk_tag(struct atag **params, UInt32 size)
145145
{
@@ -152,7 +152,7 @@ setup_ramdisk_tag(struct atag **params, UInt32 size)
152152

153153
*params = tag_next(*params); /* move pointer to next tag */
154154
}
155-
155+
#endif
156156
static void
157157
setup_initrd2_tag(struct atag **params, UInt32 start, UInt32 size)
158158
{

‎arm/boot.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ static void copy_image(UInt32 *dest, UInt32 *src, UInt32 size)
6565
*(dest++) = *(src++);
6666
}
6767
}
68-
68+
#ifdef MOVE_FRAMEBUFFER
6969
static void map_lcd(void)
7070
{
7171
#define reg(a) (*(UInt32 *)(a))
7272
reg( reg(FDADR0) + DMA_SRC)=0xa1d68000;
7373
#undef reg
7474
}
75-
75+
#endif
7676

7777
UInt32 boot_linux(ArmGlobals *g, void *kernel, UInt32 kernel_size,
7878
void *initrd, UInt32 initrd_size, char *cmdline)

‎arm/debug.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ UInt32 install_irqhandler(ArmGlobals *g, UInt32 *buf)
9494
set_DCSR(1<<31); /* global enable */
9595

9696
// return *(volatile UInt32*)0x90100000;
97-
return dest; //(UInt32)dataoffset;
97+
return (UInt32)dest; //(UInt32)dataoffset;
9898
}
9999

100100
void irqhandler() {

‎include/cocoboot.rcp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ BEGIN
5757
POPUPLIST ID PortTrigger PortList
5858
*/
5959
BUTTON "Boot!" ID LinuxButton AT (2 140 40 16)
60+
GRAFFITISTATEINDICATOR AT (144 54)
6061
END
6162

6263
/*

‎m68k/cocoboot.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <PceNativeCall.h>
2020
#include <MemGlue.h>
2121
#include <MemoryMgr.h>
22-
//#include <string.h>
22+
/*#include <string.h>*/
2323
#include <stdio.h>
2424
#include <stdlib.h>
2525
#include <string.h>
@@ -284,7 +284,7 @@ void console_mb(char *args) {
284284
}
285285

286286
/* index(3) - locate character in string */
287-
char *index(const char *s, int c)
287+
char *index(char *s, int c)
288288
{
289289
while (*s) {
290290
if(*s == c) return s;

‎m68k/mainform.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ void dump_trace_log(void)
233233
UInt16 vn = find_some_vol();
234234
UInt32 *log = (UInt32*)EndianFix32(*(UInt32*)(0x68));
235235
UInt32 *end = (UInt32*)EndianFix32(*(UInt32*)(0x64));
236-
UInt32 val;
236+
/* UInt32 val;*/
237237
Err err;
238238
char buf[256];
239239
UInt32 bigbuf[100];
240240
UInt32 i;
241241

242-
sprintf(buf, "Log: log=%lx end=%lx blocks=%lx", log, end, end-log);
242+
sprintf(buf, "Log: log=%lx end=%lx blocks=%lx", (UInt32)log, (UInt32)end, end-log);
243243
FrmCustomAlert(InfoAlert, "Dumping...", buf, " ");
244244
err = VFSFileOpen (vn, "/cocoboot.trc", vfsModeWrite | vfsModeCreate, &f);
245245
if (err != errNone) goto error1;
@@ -266,7 +266,7 @@ void dump_trace_log(void)
266266

267267
void show_gsm_code(void)
268268
{
269-
char *buf = 0;
269+
UInt8 *buf = 0;
270270
UInt16 len;
271271
char buf2[256];
272272
int i;

0 commit comments

Comments
 (0)