2009-12-19 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/types.h (UNUSED): Removed since it conflicts with NetBSD headers. All users changed to direct __attribute__ ((unused)). Reported by Grégoire Sutre.
This commit is contained in:
parent
bfd5e52b1d
commit
0d48a435a0
12 changed files with 54 additions and 32 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-12-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* include/grub/types.h (UNUSED): Removed since it conflicts with
|
||||
NetBSD headers. All users changed to direct __attribute__ ((unused)).
|
||||
Reported by Grégoire Sutre.
|
||||
|
||||
2009-12-19 Carles Pina i Estany <carles@pina.cat>
|
||||
|
||||
* normal/menu_text.c (STANDARD_MARGIN): New macro.
|
||||
|
|
|
@ -62,7 +62,7 @@ grub_getline (void)
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_cmd_read (grub_command_t cmd UNUSED, int argc, char **args)
|
||||
grub_cmd_read (grub_command_t cmd __attribute__ ((unused)), int argc, char **args)
|
||||
{
|
||||
char *line = grub_getline ();
|
||||
if (! line)
|
||||
|
|
|
@ -107,9 +107,11 @@ static struct grub_disk_dev grub_pxe_dev =
|
|||
};
|
||||
|
||||
static grub_err_t
|
||||
grub_pxefs_dir (grub_device_t device UNUSED, const char *path UNUSED,
|
||||
grub_pxefs_dir (grub_device_t device __attribute__ ((unused)),
|
||||
const char *path __attribute__ ((unused)),
|
||||
int (*hook) (const char *filename,
|
||||
const struct grub_dirhook_info *info) UNUSED)
|
||||
const struct grub_dirhook_info *info)
|
||||
__attribute__ ((unused)))
|
||||
{
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
#include <config.h>
|
||||
#include <grub/cpu/types.h>
|
||||
|
||||
#define UNUSED __attribute__ ((unused))
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
# define GRUB_CPU_SIZEOF_VOID_P SIZEOF_VOID_P
|
||||
# define GRUB_CPU_SIZEOF_LONG SIZEOF_LONG
|
||||
|
|
|
@ -181,7 +181,9 @@ grub_elf32_size (grub_elf_t elf)
|
|||
/* Run through the program headers to calculate the total memory size we
|
||||
* should claim. */
|
||||
auto int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf, Elf32_Phdr *phdr, void *_arg);
|
||||
int NESTED_FUNC_ATTR calcsize (grub_elf_t UNUSED _elf, Elf32_Phdr *phdr, void UNUSED *_arg)
|
||||
int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf __attribute__ ((unused)),
|
||||
Elf32_Phdr *phdr,
|
||||
void *_arg __attribute__ ((unused)))
|
||||
{
|
||||
/* Only consider loadable segments. */
|
||||
if (phdr->p_type != PT_LOAD)
|
||||
|
@ -360,7 +362,9 @@ grub_elf64_size (grub_elf_t elf)
|
|||
/* Run through the program headers to calculate the total memory size we
|
||||
* should claim. */
|
||||
auto int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf, Elf64_Phdr *phdr, void *_arg);
|
||||
int NESTED_FUNC_ATTR calcsize (grub_elf_t UNUSED _elf, Elf64_Phdr *phdr, void UNUSED *_arg)
|
||||
int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf __attribute__ ((unused)),
|
||||
Elf64_Phdr *phdr,
|
||||
void *_arg __attribute__ ((unused)))
|
||||
{
|
||||
/* Only consider loadable segments. */
|
||||
if (phdr->p_type != PT_LOAD)
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
#include <grub/cpu/multiboot.h>
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, UNUSED grub_addr_t *addr,
|
||||
grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr,
|
||||
grub_addr_t *addr __attribute__ ((unused)),
|
||||
int *do_load)
|
||||
{
|
||||
Elf32_Addr paddr = phdr->p_paddr;
|
||||
|
@ -48,7 +49,8 @@ grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, UNUSED grub_addr_t *addr,
|
|||
}
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr, UNUSED grub_addr_t *addr,
|
||||
grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr,
|
||||
grub_addr_t *addr __attribute__ ((unused)),
|
||||
int *do_load)
|
||||
{
|
||||
Elf64_Addr paddr = phdr->p_paddr;
|
||||
|
@ -82,7 +84,8 @@ grub_mb2_arch_module_alloc (grub_size_t size, grub_addr_t *addr)
|
|||
}
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_module_free (grub_addr_t addr, UNUSED grub_size_t size)
|
||||
grub_mb2_arch_module_free (grub_addr_t addr,
|
||||
grub_size_t size __attribute__ ((unused)))
|
||||
{
|
||||
grub_free((void *) addr);
|
||||
return GRUB_ERR_NONE;
|
||||
|
|
|
@ -36,7 +36,8 @@ typedef void (*kernel_entry_t) (unsigned long, void *, int (void *),
|
|||
|
||||
/* Claim the memory occupied by the multiboot kernel. */
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, UNUSED grub_addr_t *addr,
|
||||
grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr,
|
||||
grub_addr_t *addr __attribute__((unused)),
|
||||
int *do_load)
|
||||
{
|
||||
int rc;
|
||||
|
@ -61,7 +62,8 @@ grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, UNUSED grub_addr_t *addr,
|
|||
|
||||
/* Claim the memory occupied by the multiboot kernel. */
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr, UNUSED grub_addr_t *addr,
|
||||
grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr,
|
||||
grub_addr_t *addr __attribute__((unused)),
|
||||
int *do_load)
|
||||
{
|
||||
int rc;
|
||||
|
|
|
@ -123,8 +123,9 @@ SUFFIX (grub_macho_size) (grub_macho_t macho, grub_macho_addr_t *segments_start,
|
|||
should claim. */
|
||||
auto int NESTED_FUNC_ATTR calcsize (grub_macho_t _macho,
|
||||
struct grub_macho_cmd *phdr, void *_arg);
|
||||
int NESTED_FUNC_ATTR calcsize (grub_macho_t UNUSED _macho,
|
||||
struct grub_macho_cmd *hdr0, void UNUSED *_arg)
|
||||
int NESTED_FUNC_ATTR calcsize (grub_macho_t _macho __attribute__ ((unused)),
|
||||
struct grub_macho_cmd *hdr0,
|
||||
void *_arg __attribute__ ((unused)))
|
||||
{
|
||||
grub_macho_segment_t *hdr = (grub_macho_segment_t *) hdr0;
|
||||
if (hdr->cmd != GRUB_MACHO_CMD_SEGMENT)
|
||||
|
@ -166,10 +167,10 @@ SUFFIX (grub_macho_load) (grub_macho_t macho, char *offset, int flags)
|
|||
grub_err_t err = 0;
|
||||
auto int NESTED_FUNC_ATTR do_load(grub_macho_t _macho,
|
||||
struct grub_macho_cmd *hdr0,
|
||||
void UNUSED *_arg);
|
||||
void *_arg __attribute__ ((unused)));
|
||||
int NESTED_FUNC_ATTR do_load(grub_macho_t _macho,
|
||||
struct grub_macho_cmd *hdr0,
|
||||
void UNUSED *_arg)
|
||||
void *_arg __attribute__ ((unused)))
|
||||
{
|
||||
grub_macho_segment_t *hdr = (grub_macho_segment_t *) hdr0;
|
||||
|
||||
|
@ -223,11 +224,11 @@ SUFFIX (grub_macho_get_entry_point) (grub_macho_t macho)
|
|||
{
|
||||
grub_macho_addr_t entry_point = 0;
|
||||
auto int NESTED_FUNC_ATTR hook(grub_macho_t _macho,
|
||||
struct grub_macho_cmd *hdr,
|
||||
void UNUSED *_arg);
|
||||
int NESTED_FUNC_ATTR hook(grub_macho_t UNUSED _macho,
|
||||
struct grub_macho_cmd *hdr,
|
||||
void UNUSED *_arg)
|
||||
struct grub_macho_cmd *hdr,
|
||||
void *_arg __attribute__ ((unused)));
|
||||
int NESTED_FUNC_ATTR hook(grub_macho_t _macho __attribute__ ((unused)),
|
||||
struct grub_macho_cmd *hdr,
|
||||
void *_arg __attribute__ ((unused)))
|
||||
{
|
||||
if (hdr->cmd == GRUB_MACHO_CMD_THREAD)
|
||||
entry_point = ((grub_macho_thread_t *) hdr)->entry_point;
|
||||
|
|
|
@ -222,7 +222,8 @@ grub_mb2_unload (void)
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_mb2_load_other (UNUSED grub_file_t file, UNUSED void *buffer)
|
||||
grub_mb2_load_other (grub_file_t file __attribute__ ((unused)),
|
||||
void *buffer __attribute__ ((unused)))
|
||||
{
|
||||
/* XXX Create module tag here. */
|
||||
return grub_error (GRUB_ERR_UNKNOWN_OS, "currently only ELF is supported");
|
||||
|
|
|
@ -488,7 +488,7 @@ grub_util_is_dmraid (const char *os_dev)
|
|||
}
|
||||
|
||||
int
|
||||
grub_util_get_dev_abstraction (const char *os_dev UNUSED)
|
||||
grub_util_get_dev_abstraction (const char *os_dev __attribute__((unused)))
|
||||
{
|
||||
#ifdef __linux__
|
||||
/* Check for LVM. */
|
||||
|
|
|
@ -35,8 +35,10 @@ escape_of_path (const char *orig_path)
|
|||
}
|
||||
|
||||
void
|
||||
grub_util_emit_devicemap_entry (FILE *fp, char *name, int is_floppy UNUSED,
|
||||
int *num_fd UNUSED, int *num_hd UNUSED)
|
||||
grub_util_emit_devicemap_entry (FILE *fp, char *name,
|
||||
int is_floppy __attribute__((unused)),
|
||||
int *num_fd __attribute__((unused)),
|
||||
int *num_hd __attribute__((unused)))
|
||||
{
|
||||
const char *orig_path = grub_util_devname_to_ofpath (name);
|
||||
char *ofpath = escape_of_path (orig_path);
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <ctype.h>
|
||||
|
||||
#ifdef OFPATH_STANDALONE
|
||||
#define UNUSED __attribute__((unused))
|
||||
#define xmalloc malloc
|
||||
void
|
||||
grub_util_error (const char *fmt, ...)
|
||||
|
@ -199,8 +198,10 @@ get_basename(char *p)
|
|||
|
||||
static void
|
||||
of_path_of_vdisk(char *of_path,
|
||||
const char *devname UNUSED, const char *device,
|
||||
const char *devnode UNUSED, const char *devicenode)
|
||||
const char *devname __attribute__((unused)),
|
||||
const char *device,
|
||||
const char *devnode __attribute__((unused)),
|
||||
const char *devicenode)
|
||||
{
|
||||
char *sysfs_path, *p;
|
||||
int devno, junk;
|
||||
|
@ -217,8 +218,9 @@ of_path_of_vdisk(char *of_path,
|
|||
|
||||
static void
|
||||
of_path_of_ide(char *of_path,
|
||||
const char *devname UNUSED, const char *device,
|
||||
const char *devnode UNUSED, const char *devicenode)
|
||||
const char *devname __attribute__((unused)), const char *device,
|
||||
const char *devnode __attribute__((unused)),
|
||||
const char *devicenode)
|
||||
{
|
||||
char *sysfs_path, *p;
|
||||
int chan, devno;
|
||||
|
@ -299,8 +301,9 @@ check_sas (char *sysfs_path, int *tgt)
|
|||
|
||||
static void
|
||||
of_path_of_scsi(char *of_path,
|
||||
const char *devname UNUSED, const char *device,
|
||||
const char *devnode UNUSED, const char *devicenode)
|
||||
const char *devname __attribute__((unused)), const char *device,
|
||||
const char *devnode __attribute__((unused)),
|
||||
const char *devicenode)
|
||||
{
|
||||
const char *p, *digit_string, *disk_name;
|
||||
int host, bus, tgt, lun;
|
||||
|
|
Loading…
Reference in a new issue