* grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):

Set-but-not-used variable ifdef'ed.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Likewise.
	* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Set-but-not-used
	variable removed.
	* grub-core/disk/lvm.c (grub_lvm_scan_device): Likewise.
	* grub-core/fs/jfs.c (grub_jfs_find_file): Likewise.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_read_extent): Likewise.
	* grub-core/fs/ufs.c (grub_ufs_dir): Likewise.
	* grub-core/gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
	* grub-core/gfxmenu/view.c (redraw_menu_visit): Likewise.
	* grub-core/gfxmenu/widget-box.c (draw): Likewise.
	* grub-core/lib/relocator.c (malloc_in_range): Likewise.
	* grub-core/loader/i386/bsdXX.c (grub_netbsd_load_elf_meta): Likewise.
	* grub-core/loader/i386/bsd_pagetable.c (fill_bsd64_pagetable):
	Likewise.
This commit is contained in:
Szymon Janc 2010-10-16 22:16:52 +02:00
parent e19b016b30
commit 6bdda8f877
15 changed files with 38 additions and 53 deletions

View file

@ -486,8 +486,12 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
if (legacy_commands[cmdnum].flags & FLAG_TERMINAL)
{
int dumb = 0, no_echo = 0, no_edit = 0, lines = 24;
int console = 0, serial = 0, hercules = 0;
int dumb = 0, lines = 24;
#ifdef TODO
int no_echo = 0, no_edit = 0;
int hercules = 0;
#endif
int console = 0, serial = 0;
/* Big enough for any possible resulting command. */
char outbuf[256] = "";
char *outptr;
@ -497,13 +501,13 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
" [console] [serial] [hercules]"*/
if (grub_memcmp (ptr, "--dumb", sizeof ("--dumb") - 1) == 0)
dumb = 1;
#ifdef TODO
if (grub_memcmp (ptr, "--no-echo", sizeof ("--no-echo") - 1) == 0)
no_echo = 1;
if (grub_memcmp (ptr, "--no-edit", sizeof ("--no-edit") - 1) == 0)
no_edit = 1;
#endif
if (grub_memcmp (ptr, "--lines=", sizeof ("--lines=") - 1) == 0)
{
lines = grub_strtoul (ptr + sizeof ("--lines=") - 1, 0, 0);
@ -519,10 +523,10 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
if (grub_memcmp (ptr, "serial", sizeof ("serial") - 1) == 0)
serial = 1;
#ifdef TODO
if (grub_memcmp (ptr, "hercules", sizeof ("hercules") - 1) == 0)
hercules = 1;
#endif
while (*ptr && !grub_isspace (*ptr))
ptr++;
while (*ptr && grub_isspace (*ptr))

View file

@ -579,7 +579,6 @@ malloc_in_range (struct grub_relocator *rel,
for (ra = &base_saved, r = *ra; r; ra = &(r->next), r = *ra)
{
int pre_added = 0;
pa = r->first;
p = pa->next;
if (p->magic == GRUB_MM_ALLOC_MAGIC)
@ -591,7 +590,6 @@ malloc_in_range (struct grub_relocator *rel,
__LINE__, p, p->magic);
if (p == (grub_mm_header_t) (r + 1))
{
pre_added = 1;
events[N].type = REG_BEG_START;
events[N].pos = grub_vtop (r) - r->pre_size;
events[N].reg = r;
@ -667,7 +665,6 @@ malloc_in_range (struct grub_relocator *rel,
const int nlefto = 0;
#endif
grub_addr_t starta = 0;
int numstarted;
for (j = from_low_priv ? 0 : N - 1; from_low_priv ? j < N : (j + 1);
from_low_priv ? j++ : j--)
{
@ -725,11 +722,8 @@ malloc_in_range (struct grub_relocator *rel,
isinsideafter = (!ncollisions && (nstarted || ((nlefto || nstartedfw)
&& !nblockfw)));
if (!isinsidebefore && isinsideafter)
{
starta = from_low_priv ? ALIGN_UP (events[j].pos, align)
: ALIGN_DOWN (events[j].pos - size, align) + size;
numstarted = j;
}
starta = from_low_priv ? ALIGN_UP (events[j].pos, align)
: ALIGN_DOWN (events[j].pos - size, align) + size;
if (isinsidebefore && !isinsideafter && from_low_priv)
{
target = starta;