* 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

@ -1,3 +1,23 @@
2010-10-16 Szymon Janc <szymon@janc.net.pl>
* 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.
2010-10-16 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/commands/acpihalt.c (skip_ext_op): Skip index field op.

View file

@ -220,7 +220,6 @@ grub_ohci_pci_iter (grub_pci_device_t dev,
grub_pci_address_t addr;
struct grub_ohci *o;
grub_uint32_t revision;
int cs5536;
int j;
/* Determine IO base address. */
@ -230,7 +229,6 @@ grub_ohci_pci_iter (grub_pci_device_t dev,
{
grub_uint64_t basereg;
cs5536 = 1;
basereg = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_USB_OHCI_BASE);
if (!(basereg & GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE))
{

View file

@ -225,7 +225,9 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)),
int argc, char **args)
{
int i;
#ifdef TODO
int no_mem_option = 0;
#endif
struct grub_command *cmd;
char **cutargs;
int cutargc;
@ -235,7 +237,9 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)),
/* FIXME: really support this. */
if (argc >= 1 && grub_strcmp (args[0], "--no-mem-option") == 0)
{
#ifdef TODO
no_mem_option = 1;
#endif
argc--;
args++;
continue;

View file

@ -259,7 +259,7 @@ grub_lvm_scan_device (const char *name)
{
grub_err_t err;
grub_disk_t disk;
grub_uint64_t da_offset, da_size, mda_offset, mda_size;
grub_uint64_t mda_offset, mda_size;
char buf[GRUB_LVM_LABEL_SIZE];
char vg_id[GRUB_LVM_ID_STRLEN+1];
char pv_id[GRUB_LVM_ID_STRLEN+1];
@ -319,8 +319,6 @@ grub_lvm_scan_device (const char *name)
pv_id[j] = '\0';
dlocn = pvh->disk_areas_xl;
da_offset = grub_le_to_cpu64 (dlocn->offset);
da_size = grub_le_to_cpu64 (dlocn->size);
dlocn++;
/* Is it possible to have multiple data/metadata areas? I haven't

View file

@ -601,7 +601,6 @@ grub_jfs_find_file (struct grub_jfs_data *data, const char *path)
char fpath[grub_strlen (path)];
char *name = fpath;
char *next;
unsigned int pos = 0;
struct grub_jfs_diropen *diro;
grub_strncpy (fpath, path, grub_strlen (path) + 1);
@ -664,8 +663,6 @@ grub_jfs_find_file (struct grub_jfs_data *data, const char *path)
if (!next)
return 0;
pos = 0;
name = next;
next = grub_strchr (name, '/');
if (next)

View file

@ -436,7 +436,6 @@ grub_minix_dir (grub_device_t device, const char *path,
const struct grub_dirhook_info *info))
{
struct grub_minix_data *data = 0;
struct grub_minix_sblock *sblock;
unsigned int pos = 0;
data = grub_minix_mount (device->disk);
@ -447,8 +446,6 @@ grub_minix_dir (grub_device_t device, const char *path,
if (grub_errno)
goto fail;
sblock = &data->sblock;
grub_minix_find_file (data, path);
if (grub_errno)
goto fail;

View file

@ -149,7 +149,6 @@ grub_sfs_read_extent (struct grub_sfs_data *data, unsigned int block,
struct grub_sfs_btree *tree;
int i;
int next;
int prev;
treeblock = grub_malloc (data->blocksize);
if (!block)
@ -161,8 +160,6 @@ grub_sfs_read_extent (struct grub_sfs_data *data, unsigned int block,
/* Handle this level in the btree. */
do
{
prev = 0;
grub_disk_read (data->disk, next, 0, data->blocksize, treeblock);
if (grub_errno)
{

View file

@ -568,7 +568,6 @@ grub_ufs_dir (grub_device_t device, const char *path,
const struct grub_dirhook_info *info))
{
struct grub_ufs_data *data;
struct grub_ufs_sblock *sblock;
unsigned int pos = 0;
data = grub_ufs_mount (device->disk);
@ -579,8 +578,6 @@ grub_ufs_dir (grub_device_t device, const char *path,
if (grub_errno)
return grub_errno;
sblock = &data->sblock;
if (!path || path[0] != '/')
{
grub_error (GRUB_ERR_BAD_FILENAME, "bad filename");

View file

@ -563,7 +563,6 @@ grub_gui_list_new (void)
list_impl_t self;
grub_font_t default_font;
grub_gui_color_t default_fg_color;
grub_gui_color_t default_bg_color;
self = grub_zalloc (sizeof (*self));
if (! self)
@ -576,7 +575,6 @@ grub_gui_list_new (void)
default_font = grub_font_get ("Unknown Regular 16");
default_fg_color = grub_gui_color_rgb (0, 0, 0);
default_bg_color = grub_gui_color_rgb (255, 255, 255);
self->icon_width = 32;
self->icon_height = 32;

View file

@ -309,10 +309,8 @@ redraw_menu_visit (grub_gui_component_t component,
view = userdata;
if (component->ops->is_instance (component, "list"))
{
grub_gui_list_t list;
grub_video_rect_t bounds;
list = (grub_gui_list_t) component;
component->ops->get_bounds (component, &bounds);
grub_gfxmenu_view_redraw (view, &bounds);
}

View file

@ -79,21 +79,9 @@ static void
draw (grub_gfxmenu_box_t self, int x, int y)
{
int height_n;
int height_s;
int height_e;
int height_w;
int width_n;
int width_s;
int width_e;
int width_w;
height_n = get_height (self->scaled_pixmaps[BOX_PIXMAP_N]);
height_s = get_height (self->scaled_pixmaps[BOX_PIXMAP_S]);
height_e = get_height (self->scaled_pixmaps[BOX_PIXMAP_E]);
height_w = get_height (self->scaled_pixmaps[BOX_PIXMAP_W]);
width_n = get_width (self->scaled_pixmaps[BOX_PIXMAP_N]);
width_s = get_width (self->scaled_pixmaps[BOX_PIXMAP_S]);
width_e = get_width (self->scaled_pixmaps[BOX_PIXMAP_E]);
width_w = get_width (self->scaled_pixmaps[BOX_PIXMAP_W]);
/* Draw sides. */

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;

View file

@ -396,10 +396,8 @@ SUFFIX (grub_netbsd_load_elf_meta) (struct grub_relocator *relocator,
Elf_Shdr *s, *symsh, *strsh;
char *shdr;
unsigned symsize, strsize;
Elf_Sym *sym;
void *sym_chunk;
grub_uint8_t *curload;
const char *str;
grub_size_t chunk_size;
Elf_Ehdr *e2;
struct grub_netbsd_btinfo_symtab symtab;
@ -473,7 +471,6 @@ SUFFIX (grub_netbsd_load_elf_meta) (struct grub_relocator *relocator,
if (grub_file_seek (file, symsh->sh_offset) == (grub_off_t) -1)
return grub_errno;
sym = (Elf_Sym *) curload;
if (grub_file_read (file, curload, symsize) != (grub_ssize_t) symsize)
{
if (! grub_errno)
@ -484,7 +481,6 @@ SUFFIX (grub_netbsd_load_elf_meta) (struct grub_relocator *relocator,
if (grub_file_seek (file, strsh->sh_offset) == (grub_off_t) -1)
return grub_errno;
str = (char *) curload;
if (grub_file_read (file, curload, strsize) != (grub_ssize_t) strsize)
{
if (! grub_errno)

View file

@ -53,7 +53,7 @@ static void
fill_bsd64_pagetable (grub_uint8_t *src, grub_addr_t target)
{
grub_uint64_t *pt2, *pt3, *pt4;
grub_addr_t pt2t, pt3t, pt4t;
grub_addr_t pt2t, pt3t;
int i;
#define PG_V 0x001
@ -65,7 +65,6 @@ fill_bsd64_pagetable (grub_uint8_t *src, grub_addr_t target)
pt3 = (grub_uint64_t *) (src + 4096);
pt2 = (grub_uint64_t *) (src + 8192);
pt4t = target;
pt3t = target + 4096;
pt2t = target + 8192;