[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] [PATCH] FreeMiNT GCC 4.6 patch
Hello.
Here is the FreeMiNT patch to enable compilation with GCC 4.6. Nothing
really important. Almost only new warnings because of the new
-Wunused-but-set-variable warning which is enabled by default, combined to
that damn -Werror.
I almost fixed everything using the UNUSED() macro. That macro was a no-op
with GCC, I also fixed it.
I have tested the mintv4e.prg kernel and xaaesv4e.km compiled with GCC 4.6,
they still work fine. And they are respectively 2 and 4 KB smaller than before.
Alan, please commit!
gcc46.patch
Fixed compilation with GCC 4.6.1. Contributed by Vincent Riviere.
--
Vincent Rivière
diff -aurN -x CVS freemint.orig/sys/arch/check_exc.c freemint.work/sys/arch/check_exc.c
--- freemint.orig/sys/arch/check_exc.c 2010-01-15 20:44:35.171875000 +0100
+++ freemint.work/sys/arch/check_exc.c 2011-07-30 19:05:48.359375000 +0200
@@ -538,6 +538,7 @@
{
ushort opcode;
opcode = *frame->pc;
+ UNUSED(opcode);
# ifndef M68000
/* Emulate the "move from sr" instruction,
* which is not privileged on 68000, and privileged later.
diff -aurN -x CVS freemint.orig/sys/arch/mprot040.c freemint.work/sys/arch/mprot040.c
--- freemint.orig/sys/arch/mprot040.c 2011-06-16 20:15:34.609375000 +0200
+++ freemint.work/sys/arch/mprot040.c 2011-07-30 19:06:06.531250000 +0200
@@ -708,6 +708,7 @@
tt_mbytes = 0;
n_megabytes = (int) ((mint_top_st / ONE_MEG) + tt_mbytes);
+ UNUSED(n_megabytes);
/*
* Get the page table size. This is done by traversing the current MMU
diff -aurN -x CVS freemint.orig/sys/fatfs.c freemint.work/sys/fatfs.c
--- freemint.orig/sys/fatfs.c 2011-05-02 20:44:01.312500000 +0200
+++ freemint.work/sys/fatfs.c 2011-07-30 19:05:08.500000000 +0200
@@ -5404,6 +5404,8 @@
bio.set_lshift (di, xbpb->recsiz);
}
+ UNUSED (fvi);
+
FAT_DEBUG (("get_bpb: val_bpb = %li", r));
return r;
}
diff -aurN -x CVS freemint.orig/sys/mint/kcompiler.h freemint.work/sys/mint/kcompiler.h
--- freemint.orig/sys/mint/kcompiler.h 2011-07-30 17:08:24.312500000 +0200
+++ freemint.work/sys/mint/kcompiler.h 2011-07-30 17:10:35.906250000 +0200
@@ -76,14 +76,7 @@
#endif
/* define to indicate unused variables: */
-# ifdef __TURBOC__
# define UNUSED(x) (void) x
-# endif
-
-/* default: */
-# ifndef UNUSED
-# define UNUSED(x)
-# endif
# ifndef TRUE
diff -aurN -x CVS freemint.orig/sys/sockets/inet4/tcpout.c freemint.work/sys/sockets/inet4/tcpout.c
--- freemint.orig/sys/sockets/inet4/tcpout.c 2010-12-14 18:06:58.984375000 +0100
+++ freemint.work/sys/sockets/inet4/tcpout.c 2011-07-30 17:23:58.015625000 +0200
@@ -195,6 +195,9 @@
break;
}
}
+
+ UNUSED (inq);
+ UNUSED (delay);
}
static void
diff -aurN -x CVS freemint.orig/sys/sockets/inet4/tcputil.c freemint.work/sys/sockets/inet4/tcputil.c
--- freemint.orig/sys/sockets/inet4/tcputil.c 2008-11-23 22:57:48.000000000 +0100
+++ freemint.work/sys/sockets/inet4/tcputil.c 2011-07-30 17:26:12.312500000 +0200
@@ -496,6 +496,7 @@
long datalen;
datalen = (long) buf->dend - (long) TCP_DATA (tcph);
+ UNUSED (datalen);
DEBUG (("tcpdump: srcport = %d, dstport = %d, hdrlen = %d",
tcph->srcport, tcph->dstport, tcph->hdrlen*4));
diff -aurN -x CVS freemint.orig/sys/sockets/xif/de600.h freemint.work/sys/sockets/xif/de600.h
--- freemint.orig/sys/sockets/xif/de600.h 2008-11-23 22:57:49.000000000 +0100
+++ freemint.work/sys/sockets/xif/de600.h 2011-07-30 17:37:40.984375000 +0200
@@ -181,10 +181,9 @@
* read DE600 status register
*/
#define recv_stat() ({ \
- register unsigned char s; \
(void)de600_base[READ_STAT]; \
wait (); \
- s = de600_base[NULL_CMD | HI_NIBBLE]; \
+ de600_base[NULL_CMD | HI_NIBBLE]; \
})
/*
diff -aurN -x CVS freemint.orig/sys/sockets/xif/dummyeth.c freemint.work/sys/sockets/xif/dummyeth.c
--- freemint.orig/sys/sockets/xif/dummyeth.c 2010-01-15 20:44:36.250000000 +0100
+++ freemint.work/sys/sockets/xif/dummyeth.c 2011-07-30 17:30:33.640625000 +0200
@@ -341,6 +341,7 @@
return ENOENT;
memcpy (nif->hwlocal.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwlocal.adr.bytes;
+ UNUSED (cp);
DEBUG (("dummy: hwaddr is %x:%x:%x:%x:%x:%x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
@@ -354,6 +355,7 @@
return ENOENT;
memcpy (nif->hwbrcst.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwbrcst.adr.bytes;
+ UNUSED (cp);
DEBUG (("dummy: braddr is %x:%x:%x:%x:%x:%x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
diff -aurN -x CVS freemint.orig/sys/sockets/xif/ethernat/ethernat.c freemint.work/sys/sockets/xif/ethernat/ethernat.c
--- freemint.orig/sys/sockets/xif/ethernat/ethernat.c 2010-01-15 20:44:36.437500000 +0100
+++ freemint.work/sys/sockets/xif/ethernat/ethernat.c 2011-07-30 19:07:46.953125000 +0200
@@ -390,6 +390,7 @@
// Check available memory in LAN91C111
Eth_set_bank(0);
littlemem = (*LAN_MIR) & 0x00ff;
+ UNUSED(littlemem);
// if (len == 0)
// {
// c_conws("Insufficient memory in LAN91C111!\n\r");
@@ -634,6 +635,7 @@
return ENOENT;
memcpy (nif->hwlocal.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwlocal.adr.bytes;
+ UNUSED (cp);
DEBUG (("dummy: hwaddr is %x:%x:%x:%x:%x:%x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
@@ -647,6 +649,7 @@
return ENOENT;
memcpy (nif->hwbrcst.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwbrcst.adr.bytes;
+ UNUSED (cp);
DEBUG (("dummy: braddr is %x:%x:%x:%x:%x:%x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
diff -aurN -x CVS freemint.orig/sys/sockets/xif/lance.c freemint.work/sys/sockets/xif/lance.c
--- freemint.orig/sys/sockets/xif/lance.c 2010-01-15 20:44:36.265625000 +0100
+++ freemint.work/sys/sockets/xif/lance.c 2011-07-30 19:07:15.359375000 +0200
@@ -333,6 +333,7 @@
return ENOENT;
memcpy (nif->hwlocal.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwlocal.adr.bytes;
+ UNUSED (cp);
DEBUG (("LANCE: hwaddr is %02x:%02x:%02x:%02x:%02x:%02x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
@@ -348,6 +349,7 @@
return ENOENT;
memcpy (nif->hwbrcst.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwbrcst.adr.bytes;
+ UNUSED (cp);
DEBUG (("LANCE: braddr is %02x:%02x:%02x:%02x:%02x:%02x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
@@ -707,7 +709,6 @@
#endif
# endif
register ushort csr0;
- register int type;
ushort sr; /* New since Nov/11/1998 */
@@ -744,7 +745,6 @@
if ((STP|ENP) == (rmd->rmd1 & (ERR|STP|ENP)))
{
pkt = pkt_rcv_ring[rcv_ring_host];
- type = pkt->et_type;
/*
* packet length without checksum
@@ -923,15 +923,10 @@
static void
lance_install_ints (void)
{
- long old_v5
-# ifdef PAMs_INTERN
- , old_hbl
-# endif
- ;
ushort sr;
sr = spl7 ();
- old_v5 = (long)Setexc (LANCEIVEC, lance_v5_int);
+ (void)Setexc (LANCEIVEC, lance_v5_int);
# ifdef PAMs_INTERN
/*
* This is a real dirty hack but seems to be necessary for the MiNT
@@ -951,7 +946,7 @@
old_vbi = (long)Setexc (HBI+2, lance_vbi_int);
*(char *)LANCEIVECREG = LANCEIVEC;
- old_hbl = (long)Setexc (HBI, lance_hbi_int);
+ (void)Setexc (HBI, lance_hbi_int);
# endif
# ifdef RIEBL
*(char *)LANCEIVECREG = LANCEIVEC;
diff -aurN -x CVS freemint.orig/sys/sockets/xif/nfeth/nfeth.c freemint.work/sys/sockets/xif/nfeth/nfeth.c
--- freemint.orig/sys/sockets/xif/nfeth/nfeth.c 2010-01-15 20:44:36.500000000 +0100
+++ freemint.work/sys/sockets/xif/nfeth/nfeth.c 2011-07-30 17:27:33.328125000 +0200
@@ -399,6 +399,7 @@
return ENOENT;
memcpy (nif->hwlocal.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwlocal.adr.bytes;
+ UNUSED (cp);
DEBUG (("dummy: hwaddr is %x:%x:%x:%x:%x:%x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
@@ -412,6 +413,7 @@
return ENOENT;
memcpy (nif->hwbrcst.adr.bytes, ifo->ifou.v_string, ETH_ALEN);
cp = nif->hwbrcst.adr.bytes;
+ UNUSED (cp);
DEBUG (("dummy: braddr is %x:%x:%x:%x:%x:%x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]));
}
diff -aurN -x CVS freemint.orig/sys/usb/src.km/hub.c freemint.work/sys/usb/src.km/hub.c
--- freemint.orig/sys/usb/src.km/hub.c 2011-04-29 13:39:28.000000000 +0200
+++ freemint.work/sys/usb/src.km/hub.c 2011-07-30 17:51:34.656250000 +0200
@@ -229,6 +229,7 @@
portstatus = le2cpu16(portsts.wPortStatus);
portchange = le2cpu16(portsts.wPortChange);
+ UNUSED(portchange);
DEBUG(("portstatus %x, change %x, %s",
portstatus, portchange, portspeed(portstatus)));
@@ -402,6 +403,7 @@
}
hubsts = (struct usb_hub_status *)buffer;
+ UNUSED(hubsts);
DEBUG(("get_hub_status returned status %x, change %x",
le2cpu16(hubsts->wHubStatus),
le2cpu16(hubsts->wHubChange)));
diff -aurN -x CVS freemint.orig/sys/usb/src.km/ucd/netusbee/isp116x.h freemint.work/sys/usb/src.km/ucd/netusbee/isp116x.h
--- freemint.orig/sys/usb/src.km/ucd/netusbee/isp116x.h 2011-05-22 23:24:56.000000000 +0200
+++ freemint.work/sys/usb/src.km/ucd/netusbee/isp116x.h 2011-07-30 17:46:59.859375000 +0200
@@ -366,6 +366,8 @@
isp116x->addr_reg = (u16*)ISP116X_HCD_ADDR;
dumm = __raw_readw(isp116x->addr_reg);
isp116x_delay(isp116x, UDELAY);
+
+ UNUSED (dumm);
}
static inline void isp116x_write_data16(struct isp116x *isp116x, unsigned short val)
@@ -377,6 +379,8 @@
isp116x->addr_reg = (u16*)((ISP116X_HCD_ADDR - 0x4000) + ((val & 0x00ff)<<1));
dumm = __raw_readw(isp116x->addr_reg);
isp116x_delay(isp116x, UDELAY);
+
+ UNUSED (dumm);
}
static inline void isp116x_raw_write_data16(struct isp116x *isp116x, unsigned short val)
@@ -388,6 +392,8 @@
isp116x->addr_reg = (u16*)((ISP116X_HCD_ADDR - 0x4000) + ((val & 0xff00)>>7));
dumm = __raw_readw(isp116x->addr_reg);
isp116x_delay(isp116x, UDELAY);
+
+ UNUSED (dumm);
}
static inline unsigned short isp116x_read_data16(struct isp116x *isp116x)
@@ -439,6 +445,8 @@
isp116x->addr_reg = (u16*)((ISP116X_HCD_ADDR - 0x4000) + ((val & 0xff000000)>>23) );
dumm = __raw_readw(isp116x->addr_reg);
isp116x_delay(isp116x, UDELAY);
+
+ UNUSED (dumm);
}
/***********************************************/
diff -aurN -x CVS freemint.orig/sys/usb/src.km/udd/storage/usb_storage.c freemint.work/sys/usb/src.km/udd/storage/usb_storage.c
--- freemint.orig/sys/usb/src.km/udd/storage/usb_storage.c 2011-04-29 13:39:28.000000000 +0200
+++ freemint.work/sys/usb/src.km/udd/storage/usb_storage.c 2011-07-30 17:50:01.171875000 +0200
@@ -623,9 +623,11 @@
/* round to 1 digit */
mb_quot = mb / 10;
mb_rem = mb - (10 * mb_quot);
+ UNUSED(mb_rem);
gb = mb / 1024;
gb_quot = gb / 10;
gb_rem = gb - (10 * gb_quot);
+ UNUSED(gb_rem);
#ifdef CONFIG_LBA48
if(dev_desc->lba48)
DEBUG(("Supports 48-bit addressing"));
@@ -838,6 +840,7 @@
cmd[1] = 4;
result = usb_control_msg(us->pusb_dev, usb_sndctrlpipe(us->pusb_dev, 0),
US_CBI_ADSC, USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0, us->ifnum, cmd, sizeof(cmd), USB_CNTL_TIMEOUT * 5);
+ UNUSED(result);
/* long wait for reset */
mdelay(1500);
DEBUG(("CB_reset result %ld: status %lx clearing endpoint halt", result, us->pusb_dev->status));
diff -aurN -x CVS freemint.orig/sys/usb/src.km/usb.c freemint.work/sys/usb/src.km/usb.c
--- freemint.orig/sys/usb/src.km/usb.c 2011-04-29 13:39:28.000000000 +0200
+++ freemint.work/sys/usb/src.km/usb.c 2011-07-30 17:52:45.703125000 +0200
@@ -1227,7 +1227,7 @@
LIST_FOREACH (tmp, &usb_driver_list, chain)
{
- void *private;
+ void *private = NULL;
struct usb_driver *driver = tmp;
DEBUG(("LIST_FOREACH. tmp %lx", tmp ));
diff -aurN -x CVS freemint.orig/sys/xdd/mfp/mfp.c freemint.work/sys/xdd/mfp/mfp.c
--- freemint.orig/sys/xdd/mfp/mfp.c 2011-06-21 00:26:11.140625000 +0200
+++ freemint.work/sys/xdd/mfp/mfp.c 2011-07-30 17:55:58.562500000 +0200
@@ -1147,7 +1147,6 @@
if (iovar_mfp_tt)
{
IOVAR *iovar = iovar_mfp_tt;
- void *old;
uchar reg;
iovar->table = baudtable_st;
@@ -1165,10 +1164,10 @@
# define vector(x) (x / 4)
- old = Setexc (vector (0x164), ttmfp1_txerror);
- old = Setexc (vector (0x168), ttmfp1_txempty);
- old = Setexc (vector (0x16c), ttmfp1_rxerror);
- old = Setexc (vector (0x170), ttmfp1_rxavail);
+ (void) Setexc (vector (0x164), ttmfp1_txerror);
+ (void) Setexc (vector (0x168), ttmfp1_txempty);
+ (void) Setexc (vector (0x16c), ttmfp1_rxerror);
+ (void) Setexc (vector (0x170), ttmfp1_rxavail);
# undef vector
diff -aurN -x CVS freemint.orig/sys/xdd/scc/scc.c freemint.work/sys/xdd/scc/scc.c
--- freemint.orig/sys/xdd/scc/scc.c 2007-07-14 00:48:36.000000000 +0200
+++ freemint.work/sys/xdd/scc/scc.c 2011-07-30 18:01:40.828125000 +0200
@@ -1150,8 +1150,6 @@
init_SCC (&iovar_sccb, sccb);
if (iovar_sccb)
{
- void *old;
-
if (flag_14_7456_mhz)
iovar_sccb->table = baudtable_14_7456_mhz;
else if (mch == FALCON)
@@ -1167,10 +1165,10 @@
# define vector(x) (x / 4)
- old = Setexc (vector (0x180), sccb_txempty);
- old = Setexc (vector (0x188), sccb_stchange);
- old = Setexc (vector (0x190), sccb_rxavail);
- old = Setexc (vector (0x198), sccb_special);
+ (void) Setexc (vector (0x180), sccb_txempty);
+ (void) Setexc (vector (0x188), sccb_stchange);
+ (void) Setexc (vector (0x190), sccb_rxavail);
+ (void) Setexc (vector (0x198), sccb_special);
# undef vector
}
@@ -1178,8 +1176,6 @@
init_SCC (&iovar_scca, scca);
if (iovar_scca)
{
- void *old;
-
if (flag_14_7456_mhz)
iovar_scca->table = baudtable_14_7456_mhz;
/* else if (mch == FALCON)
@@ -1215,10 +1211,10 @@
# define vector(x) (x / 4)
- old = Setexc (vector (0x1a0), scca_txempty);
- old = Setexc (vector (0x1a8), scca_stchange);
- old = Setexc (vector (0x1b0), scca_rxavail);
- old = Setexc (vector (0x1b8), scca_special);
+ (void) Setexc (vector (0x1a0), scca_txempty);
+ (void) Setexc (vector (0x1a8), scca_stchange);
+ (void) Setexc (vector (0x1b0), scca_rxavail);
+ (void) Setexc (vector (0x1b8), scca_special);
# undef vector
}
@@ -1613,7 +1609,6 @@
{
IOVAR *iovar;
SCC *regs;
- uchar ctlreg;
asm volatile
(
@@ -1627,8 +1622,8 @@
DEBUG (("scc_special: %lx", regs));
- ctlreg = ZS_READ (regs, RR1);
- ctlreg = ZS_READ (regs, RR8);
+ ZS_READ (regs, RR1);
+ ZS_READ (regs, RR8);
ZS_WRITE_0 (regs, ERRRES);
ZS_WRITE_0 (regs, RHIUS);
diff -aurN -x CVS freemint.orig/sys/xdd/uart/pc16550.c freemint.work/sys/xdd/uart/pc16550.c
--- freemint.orig/sys/xdd/uart/pc16550.c 2007-07-14 00:48:36.000000000 +0200
+++ freemint.work/sys/xdd/uart/pc16550.c 2011-07-30 18:02:35.687500000 +0200
@@ -1380,12 +1380,10 @@
}
else if (intr_num < MAX_INTS)
{
- void *old;
-
DEBUG (("allocating new int handler %d to iovar %d, INT %d", intr_num, i, IOVARS (i)->intr));
intr_iovar[intr_num] = IOVARS (i);
- old = Setexc (80 + IOVARS (i)->intr, intr_handler[intr_num]);
+ (void) Setexc (80 + IOVARS (i)->intr, intr_handler[intr_num]);
DEBUG (("old int handler = %lx", old));
intr_num++;
diff -aurN -x CVS freemint.orig/sys/xfs/minixfs/minixsys.c freemint.work/sys/xfs/minixfs/minixsys.c
--- freemint.orig/sys/xfs/minixfs/minixsys.c 2007-07-13 23:32:53.000000000 +0200
+++ freemint.work/sys/xfs/minixfs/minixsys.c 2011-07-30 18:05:26.828125000 +0200
@@ -884,9 +884,8 @@
long finode, ret;
d_inode rip;
long pos;
- char dirmove, dirren;
+ char dirmove;
dirmove = 0;
- dirren = 0;
/* Check cross drives */
if (olddir->dev != newdir->dev)
@@ -909,7 +908,6 @@
/* Sanity check movement of directories */
if (IS_DIR (rip))
{
- dirren = 1;
if (olddir->index != newdir->index)
{
# ifdef MFS_NMOVE_DIR
diff -aurN -x CVS freemint.orig/xaaes/src.km/app_man.c freemint.work/xaaes/src.km/app_man.c
--- freemint.orig/xaaes/src.km/app_man.c 2011-07-07 22:44:52.968750000 +0200
+++ freemint.work/xaaes/src.km/app_man.c 2011-07-30 18:11:21.546875000 +0200
@@ -74,10 +74,9 @@
bool
wind_has_focus(struct xa_window *wind)
{
- struct xa_client *c;
struct xa_window *w;
- c = find_focus(true, NULL, NULL, &w);
+ find_focus(true, NULL, NULL, &w);
return wind == w ? true : false;
}
@@ -459,7 +458,6 @@
{
struct proc *proc;
struct proc *menu_lock = menustruct_locked();
- struct xa_client *client;
DIAG((D_appl, NULL, "Attempting to recover control....."));
@@ -467,8 +465,6 @@
if ((proc = C.update_lock))
{
- client = proc2client(proc);
-
DIAG((D_appl, NULL, "Killing owner of update lock"));
free_update_lock();
if (C.mouse_lock == proc)
diff -aurN -x CVS freemint.orig/xaaes/src.km/desktop.c freemint.work/xaaes/src.km/desktop.c
--- freemint.orig/xaaes/src.km/desktop.c 2011-06-19 14:40:52.406250000 +0200
+++ freemint.work/xaaes/src.km/desktop.c 2011-07-30 18:14:42.671875000 +0200
@@ -177,6 +177,7 @@
ob = new_desktop->tree;
*(RECT *)&ob->ob_x = root_window->wa;
r = *(RECT*)&ob->ob_x;
+ UNUSED(r);
/* Now use the root window's auto-redraw function to redraw it
*
* HR: 110601 fixed erroneous use owner->wt.
diff -aurN -x CVS freemint.orig/xaaes/src.km/draw_obj.c freemint.work/xaaes/src.km/draw_obj.c
--- freemint.orig/xaaes/src.km/draw_obj.c 2011-07-28 12:05:16.328125000 +0200
+++ freemint.work/xaaes/src.km/draw_obj.c 2011-07-30 18:22:42.671875000 +0200
@@ -450,6 +450,7 @@
#endif
sstate_mask = wt->state_mask;
+ UNUSED(sstate_mask);
pret = do_callout(pfunc,p);
//if( wt->state_mask == sstate_mask && wt->state_mask && !((long)wt->state_mask & 1) )
@@ -556,6 +557,8 @@
//y = wa.y;
//maxy = y + wa.h - screen.c_max_h;
this = list->top;
+ UNUSED(this);
+ UNUSED(wa);
(*v->api->t_color)(v, G_BLACK);
diff -aurN -x CVS freemint.orig/xaaes/src.km/form.c freemint.work/xaaes/src.km/form.c
--- freemint.orig/xaaes/src.km/form.c 2011-07-28 12:05:16.359375000 +0200
+++ freemint.work/xaaes/src.km/form.c 2011-07-30 18:19:45.562500000 +0200
@@ -576,6 +576,7 @@
o = obj;
last_ob = ob_count_flag(obtree, OF_EDITABLE, 0, 0, &edcnt);
+ UNUSED(last_ob);
DIAG((D_form, NULL, "Form_Cursor: wt=%lx, obtree=%lx, obj=%d, keycode=%x, lastob=%d, editobjs=%d",
wt, obtree, obj.item, keycode, last_ob, edcnt));
diff -aurN -x CVS freemint.orig/xaaes/src.km/init.c freemint.work/xaaes/src.km/init.c
--- freemint.orig/xaaes/src.km/init.c 2011-07-30 14:32:55.281250000 +0200
+++ freemint.work/xaaes/src.km/init.c 2011-07-30 18:45:19.562500000 +0200
@@ -783,6 +783,7 @@
sd_str = "Quit XaAES";
}
+ UNUSED(sd_str);
BLOG((1,"AESSYS kthread exited - shutdown = %x(%s).", C.shutdown, sd_str));
if( C.shutdown & RESTART_XAAES )
diff -aurN -x CVS freemint.orig/xaaes/src.km/k_init.c freemint.work/xaaes/src.km/k_init.c
--- freemint.orig/xaaes/src.km/k_init.c 2011-07-13 22:37:40.138926200 +0200
+++ freemint.work/xaaes/src.km/k_init.c 2011-07-30 18:49:07.203125000 +0200
@@ -876,6 +876,8 @@
screen.c_max_h = v->cell_h;
dev2 = calc_average_fontsize(v, &screen.c_max_w, &screen.c_max_h, &screen.c_max_dist[0]);
+ UNUSED(dev1);
+ UNUSED(dev2);
BLOG((false, "stdfont: id = %d, size = %d, cw=%d, ch=%d, dev=%d",
screen.standard_font_id, screen.standard_font_point, screen.c_max_w, screen.c_max_h, dev2));
BLOG((false, "smlfont: id = %d, size = %d, cw=%d, ch=%d, dev=%d",
diff -aurN -x CVS freemint.orig/xaaes/src.km/k_main.c freemint.work/xaaes/src.km/k_main.c
--- freemint.orig/xaaes/src.km/k_main.c 2011-07-30 14:32:55.281250000 +0200
+++ freemint.work/xaaes/src.km/k_main.c 2011-07-30 18:20:34.109375000 +0200
@@ -2061,10 +2061,9 @@
if (C.KBD_dev > 0)
{
- long r;
- r = f_cntl(C.KBD_dev, (long)&KBD_dev_sg, TIOCSETN);
+ f_cntl(C.KBD_dev, (long)&KBD_dev_sg, TIOCSETN);
//KERNEL_DEBUG("fcntl(TIOCSETN) -> %li", r);
- //r = f_cntl(C.KBD_dev, NULL, TIOCFLUSH);
+ //f_cntl(C.KBD_dev, NULL, TIOCFLUSH);
f_close(C.KBD_dev);
}
diff -aurN -x CVS freemint.orig/xaaes/src.km/menuwidg.c freemint.work/xaaes/src.km/menuwidg.c
--- freemint.orig/xaaes/src.km/menuwidg.c 2011-07-28 12:05:16.437500000 +0200
+++ freemint.work/xaaes/src.km/menuwidg.c 2011-07-30 19:11:28.187500000 +0200
@@ -1274,6 +1274,9 @@
k->y = y;
popup(tab, -1);
}*/
+
+ UNUSED(x);
+ UNUSED(y);
}
else
popup(tab, entry);
diff -aurN -x CVS freemint.orig/xaaes/src.km/render_obj.c freemint.work/xaaes/src.km/render_obj.c
--- freemint.orig/xaaes/src.km/render_obj.c 2011-07-30 14:32:55.296875000 +0200
+++ freemint.work/xaaes/src.km/render_obj.c 2011-07-30 18:23:15.765625000 +0200
@@ -6376,9 +6376,7 @@
if (screen->planes >= 8)
{
- struct texture *t;
-
- t = install_texture("dbox.img"/*steel3.img"*/, NULL, &theme->box, ST_ALL, ST_ALL, 0, 0, 0, 0);
+ install_texture("dbox.img"/*steel3.img"*/, NULL, &theme->box, ST_ALL, ST_ALL, 0, 0, 0, 0);
install_texture("popbkg.img", NULL, &theme->popupbkg, ST_ALL, 0, 0, 0,0,0);
install_texture("dbutton.img", NULL, &theme->button, ST_ALL, ST_ALL, 0, ST_ALL, ST_ALL,0);
install_texture("dtext.img", NULL, &theme->text, ST_ALL, ST_ALL, 0, ST_ALL, ST_ALL, 0);
diff -aurN -x CVS freemint.orig/xaaes/src.km/scrlobjc.c freemint.work/xaaes/src.km/scrlobjc.c
--- freemint.orig/xaaes/src.km/scrlobjc.c 2011-07-28 12:05:16.468750000 +0200
+++ freemint.work/xaaes/src.km/scrlobjc.c 2011-07-30 18:25:40.312500000 +0200
@@ -810,6 +810,7 @@
x2 = dx + r.w;
dy = r.y;
y2 = dy + this->r.h - 1;
+ UNUSED(y2);
tw = r.w;
if (c->c.text.icon.icon)
{
@@ -983,6 +984,7 @@
list->vdi_settings->api->t_extent(list->vdi_settings, tpp, &wd, &h);
dx += wd;
cwd = wd / (tp-tpp);
+ UNUSED(cwd);
tpp = tp;
switch( cp )
@@ -1947,7 +1949,6 @@
insert_strings(struct scroll_entry *this, struct sc_text *t, OBJECT *icon, short type)
{
struct se_content *this_sc, *ret = NULL;
- struct se_content *sc;
int i, j = t->strings;
short slen;
const char *s = t->text;
@@ -1955,7 +1956,6 @@
size_t sz;
PRDEF(insert_strings,new_setext);
- sc = 0;
memset( tbuf, 0, sizeof(tbuf));
for (i = 0; i < j && tp < ep; i++)
{
@@ -4650,13 +4650,12 @@
SCROLL_INFO *list;
SCROLL_ENTRY *top, *n;
OBJECT *ob;
- long p, oldp;
+ long p;
short amount, msgt;
ob = wind->winob + wind->winitem;
list = object_get_slist(ob);
top = list->top;
- oldp = list->start_y;
check_movement(list);
switch (msg[0]) /* message number */
{
diff -aurN -x CVS freemint.orig/xaaes/src.km/taskman.c freemint.work/xaaes/src.km/taskman.c
--- freemint.orig/xaaes/src.km/taskman.c 2011-07-28 12:05:16.484375000 +0200
+++ freemint.work/xaaes/src.km/taskman.c 2011-07-30 18:26:12.359375000 +0200
@@ -1115,7 +1115,6 @@
else
{
struct proc *p;
- long ret;
char cmdlin[32] = "60 0 0\0";
//*cmdlin = 6;
//*(cmdlin + 6) = 0;
@@ -1135,7 +1134,7 @@
else
*(cmdlin + 3) = '0'; /* full screen */
- ret = create_process(cfg.snapper, cmdlin, NULL, &p, 0, NULL);
+ create_process(cfg.snapper, cmdlin, NULL, &p, 0, NULL);
}
// xa_graf_mouse(ARROW, NULL,NULL, false);
diff -aurN -x CVS freemint.orig/xaaes/src.km/trnfm.c freemint.work/xaaes/src.km/trnfm.c
--- freemint.orig/xaaes/src.km/trnfm.c 2011-07-13 22:37:40.342051200 +0200
+++ freemint.work/xaaes/src.km/trnfm.c 2011-07-30 18:31:52.921875000 +0200
@@ -623,6 +623,9 @@
// src->red, src->green, src->blue, dst->red, dst->green, dst->blue);
// if (D) display(" %04lx xref %d to %d(%d)", closest, i, c, j, cref[i]);
}
+
+ UNUSED(s);
+ UNUSED(d);
}
/*
* Remap the bitmap palette referances.
@@ -805,7 +808,9 @@
data = pic->addr;
s = data;
+ UNUSED(s);
e = data + (pic->ximg.img_h * stride);
+ UNUSED(e);
// display("scan %ld, wscan %ld, stride %ld", scan, wscan, stride);
// display("size of data should be %ld bytes", (pic->ximg.img_h * stride));
@@ -892,6 +897,7 @@
sl = (long)((pic->ximg.img_w + 15) & ~15) * 3;
rsl = (long)((pic->ximg.img_w + 7) & ~7) * 3;
remain = sl - rsl;
+ UNUSED(remain);
// sl = (long)pic->ximg.img_w * 3;
// display("stride %ld, sl %ld, scan %ld, wscan %ld", stride, sl, scan, wscan);
@@ -984,6 +990,7 @@
/* width byte aligned */
width = (pic->ximg.img_w + 7) >> 3;
+ UNUSED(width);
size = (long)((long)word_aligned * pic->ximg.img_h * pic->ximg.planes);
// display("depack_img: size = %ld, width=%d", size, width);
@@ -1368,6 +1375,7 @@
data = pm->mfdb.fd_addr;
ed = data + size;
+ UNUSED(ed);
switch (method)
{
diff -aurN -x CVS freemint.orig/xaaes/src.km/widgets.c freemint.work/xaaes/src.km/widgets.c
--- freemint.orig/xaaes/src.km/widgets.c 2011-07-07 22:44:53.250000000 +0200
+++ freemint.work/xaaes/src.km/widgets.c 2011-07-30 18:34:10.937500000 +0200
@@ -1238,6 +1238,7 @@
pmx = widget_active.m.x;
pmy = widget_active.m.y;
mb = widget_active.m.cstate;
+ UNUSED(mb);
rect_dist_xy(wind->owner, pmx, pmy, &r, &d);
widget_active.m.x = md->sx;
widget_active.m.y = md->sy;
@@ -2095,6 +2096,7 @@
*d++ = '\0';
i++;
+ UNUSED(d1);
/*if( d1 && *d1 && !isalnum( *d1 ) )
BLOG((0,"build_windlist_pu: owner:d='%s':'%s':'%s'", d, wind->owner->cmd_name, wind->owner->cmd_tail?wind->owner->cmd_tail:"-" ));
*/
@@ -2970,6 +2972,7 @@
OBJECT *root;
/* Convert relative coords and window location to absolute screen location */
root = rp_2_ap(wind, widg, NULL);
+ UNUSED(root);
DIAG((D_form,wind->owner,"display_object_widget(wind=%d), wt=%lx, e.obj=%d, e.pos=%d, form: %d/%d",
wind->handle, wt, edit_item(&wt->e), wt->e.pos, root->ob_x, root->ob_y));
@@ -4823,6 +4826,7 @@
if (rtn) /* If the widget click/drag function returned true we reset the state of the widget */
{
DIAG((D_button, NULL, "Deselect widget"));
+ UNUSED(oldstate);
if (f != XAW_MENU && f != XAW_TOOLBAR)
redisplay_widget(lock, w, widg, OS_NORMAL); //oldstate); //OS_NORMAL); /* Flag the widget as de-selected */
}
diff -aurN -x CVS freemint.orig/xaaes/src.km/win_draw.c freemint.work/xaaes/src.km/win_draw.c
--- freemint.orig/xaaes/src.km/win_draw.c 2011-07-13 22:37:40.592051200 +0200
+++ freemint.work/xaaes/src.km/win_draw.c 2011-07-30 18:35:49.578125000 +0200
@@ -2512,7 +2512,6 @@
{
// struct xa_wcol_inf *wci = &((struct window_colours *)wind->colours)->borders;
struct xa_vdi_settings *v = wind->vdi_settings;
- short size;
// RECT r;
if ((outer->w | outer->h | inner->w | outer->h))
@@ -2528,10 +2527,6 @@
}
else
{
-
- size = -3;
-
-
(*v->api->br_hook)(v, 0, outer, G_BLACK);
(*v->api->br_hook)(v, -1, outer, G_LBLACK);
@@ -3792,6 +3787,7 @@
ot.framesize = ut.framesize = wind->thinwork ? 1 : 2;
ot.framecol = ontop_cols->waframe_col;
+ UNUSED(ot);
ut.framecol = untop_cols->waframe_col;
break;
}
diff -aurN -x CVS freemint.orig/xaaes/src.km/xa_appl.c freemint.work/xaaes/src.km/xa_appl.c
--- freemint.orig/xaaes/src.km/xa_appl.c 2011-07-13 22:37:40.732676200 +0200
+++ freemint.work/xaaes/src.km/xa_appl.c 2011-07-30 18:36:28.828125000 +0200
@@ -303,10 +303,8 @@
// display("no shel_info");
}
- {long r;
/* use loader-pgrp for keyboard-access for clients */
- r = p_setpgrp(client->p->pid, loader_pgrp);
- }
+ p_setpgrp(client->p->pid, loader_pgrp);
/* Get the client's home directory (where it was started)
* - we use this later to load resource files, etc
diff -aurN -x CVS freemint.orig/xaaes/src.km/xa_form.c freemint.work/xaaes/src.km/xa_form.c
--- freemint.orig/xaaes/src.km/xa_form.c 2011-07-28 12:05:16.546875000 +0200
+++ freemint.work/xaaes/src.km/xa_form.c 2011-07-30 18:37:08.453125000 +0200
@@ -542,6 +542,7 @@
alert_window->window_status |= XAWS_FLOAT;
widg = get_widget(alert_window, XAW_TOOLBAR);
+ UNUSED(widg);
set_toolbar_widget(lock, alert_window, client, alert_form, inv_aesobj(), WIP_NOTEXT, STW_ZEN, NULL, &or);
wt->extra = alertxt;
diff -aurN -x CVS freemint.orig/xaaes/src.km/xa_fsel.c freemint.work/xaaes/src.km/xa_fsel.c
--- freemint.orig/xaaes/src.km/xa_fsel.c 2011-07-28 12:05:16.562500000 +0200
+++ freemint.work/xaaes/src.km/xa_fsel.c 2011-07-30 18:50:23.421875000 +0200
@@ -2223,6 +2223,7 @@
if( fs->rtflags & FS_CREATE_FOLDER )
{
r = _d_create( pt );
+ UNUSED( r );
}
else if( fs->rtflags & FS_RENAME_FILE )
{
@@ -2243,6 +2244,7 @@
sprintf( pt2, sizeof(pt2)-1, "%s%s", fs->path, fname);
r = _f_rename( 0, pt2, pt );
+ UNUSED( r );
BLOG((0,"rename '%s' -> '%s' -> %ld", pt2, pt, r ));
}
refresh_filelist(fsel, fs, 0);//fs->selected_dir->up);
@@ -2609,6 +2611,7 @@
SCROLL_ENTRY *c = list->cur, *n;
fs_slist_key(list, SC_UPARROW, 0);
n = list->del( list, c, true );
+ UNUSED(n);
}
}
}
diff -aurN -x CVS freemint.orig/xaaes/src.km/xa_pdlg.c freemint.work/xaaes/src.km/xa_pdlg.c
--- freemint.orig/xaaes/src.km/xa_pdlg.c 2011-03-13 09:47:01.578125000 +0100
+++ freemint.work/xaaes/src.km/xa_pdlg.c 2011-07-30 18:38:26.593750000 +0200
@@ -3393,6 +3393,7 @@
wt = get_widget(wind, XAW_TOOLBAR)->stuff;
list = object_get_slist(wt->tree + XPDLG_LIST);
pdlg = list->data;
+ UNUSED(pdlg);
}
return no_exit;
}
diff -aurN -x CVS freemint.orig/xaaes/src.km/xa_rsrc.c freemint.work/xaaes/src.km/xa_rsrc.c
--- freemint.orig/xaaes/src.km/xa_rsrc.c 2011-07-28 12:05:16.609375000 +0200
+++ freemint.work/xaaes/src.km/xa_rsrc.c 2011-07-30 18:42:57.812500000 +0200
@@ -823,7 +823,7 @@
obj->ob_spec.free_string += (long)b;
if( client->options.rsc_lang && !(type == G_IMAGE) )
{
- char **p = 0, *pp;
+ char **p = 0;
short blen, chgl;
if( object_has_tedinfo(obj) )
@@ -840,8 +840,6 @@
if( !p || !*p || !**p || strmchr(*p, "\r\n") )
break;
- pp = *p;
-
if( client->options.rsc_lang == WRITE )
{
if( obj->ob_type == G_TITLE )
@@ -1339,6 +1337,8 @@
}
}
+ UNUSED(end);
+
if (!rscs)
{
return NULL;
@@ -1484,21 +1484,20 @@
if( rfp ){
if( client == C.Aes && trans_strings[0] && client->options.rsc_lang )
{
- int i, k;
- long l;
+ int i;
char **t;
if( client->options.rsc_lang == WRITE )
{
rsc_lang_file( WRITE, rfp, "# - Internal Strings -", 22 );
}
- for(k = 1, i = 0; trans_strings[i]; i++)
+ for(i = 0; trans_strings[i]; i++)
{
for( t = trans_strings[i]; *t; t++)
{
if( **t )
{
- l = rsc_trans_rw( client, rfp, t, 0 );
+ rsc_trans_rw( client, rfp, t, 0 );
}
}
}
@@ -1565,6 +1564,7 @@
cur = client->resources;
+ UNUSED(rsc);
DIAG((D_rsrc,client,"FreeResources: %lx for %d, ct=%d, pb->global->rsc=%lx",
cur, client->p->pid, client->rsct, rsc));