2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
Fix warnings in grub-emu when compiling with maximum warning options. * util/grub-emu.c (ENABLE_RELOCATABLE): New definition. (grub_arch_modules_addr): Return 0 and not NULL. * util/misc.c (ENABLE_RELOCATABLE): New definition. (xstrdup): USe newstr instead of dup.
This commit is contained in:
parent
74e31b5ca2
commit
98e6959dea
3 changed files with 16 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Fix warnings in grub-emu when compiling with maximum warning options.
|
||||||
|
|
||||||
|
* util/grub-emu.c (ENABLE_RELOCATABLE): New definition.
|
||||||
|
(grub_arch_modules_addr): Return 0 and not NULL.
|
||||||
|
* util/misc.c (ENABLE_RELOCATABLE): New definition.
|
||||||
|
(xstrdup): USe newstr instead of dup.
|
||||||
|
|
||||||
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* loader/i386/linux.c (grub_linux_setup_video): Handle error
|
* loader/i386/linux.c (grub_linux_setup_video): Handle error
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
#include <grub_emu_init.h>
|
#include <grub_emu_init.h>
|
||||||
|
|
||||||
|
#define ENABLE_RELOCATABLE 0
|
||||||
#include "progname.h"
|
#include "progname.h"
|
||||||
|
|
||||||
/* Used for going back to the main function. */
|
/* Used for going back to the main function. */
|
||||||
|
@ -51,7 +52,7 @@ static char *prefix = NULL;
|
||||||
grub_addr_t
|
grub_addr_t
|
||||||
grub_arch_modules_addr (void)
|
grub_arch_modules_addr (void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_err_t
|
grub_err_t
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include <grub/time.h>
|
#include <grub/time.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
#define ENABLE_RELOCATABLE 0
|
||||||
#include "progname.h"
|
#include "progname.h"
|
||||||
|
|
||||||
/* Include malloc.h, only if memalign is available. It is known that
|
/* Include malloc.h, only if memalign is available. It is known that
|
||||||
|
@ -142,13 +143,13 @@ char *
|
||||||
xstrdup (const char *str)
|
xstrdup (const char *str)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
char *dup;
|
char *newstr;
|
||||||
|
|
||||||
len = strlen (str);
|
len = strlen (str);
|
||||||
dup = (char *) xmalloc (len + 1);
|
newstr = (char *) xmalloc (len + 1);
|
||||||
memcpy (dup, str, len + 1);
|
memcpy (newstr, str, len + 1);
|
||||||
|
|
||||||
return dup;
|
return newstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
Loading…
Add table
Reference in a new issue