Fix warnings from gcc-3.0.x. Not very serious.
This commit is contained in:
parent
f51d8ce561
commit
3c17445bfd
6 changed files with 45 additions and 26 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2001-12-11 Yoshinori K. Okuji <okuji@gnu.org>
|
||||
|
||||
* stage2/builtins.c (displayapm_func): Don't use multi-line
|
||||
string literals but string concatenation instead, to suppress
|
||||
warnings from gcc-3.0.x.
|
||||
* stage2/cmdline.c (print_cmdline_message): Likewise.
|
||||
* util/mbchk.c (usage): Likewise.
|
||||
|
||||
* stage2/smp-imps.c (imps_read_config_table): Add a break
|
||||
statement after the label ``default''.
|
||||
|
||||
* util/mbchk.c: Include <stdlib.h> for the prototype of exit.
|
||||
|
||||
* stage2/serial.c (serial_port): Initialize with 0 instead of
|
||||
-1, as an invalid value, because SERIAL_PORT is unsigned. This
|
||||
change shouldn't affect anything.
|
||||
(serial_exists): For the above change, check SERIAL_PORT with 0
|
||||
instead of -1.
|
||||
|
||||
2001-12-10 Yoshinori K. Okuji <okuji@gnu.org>
|
||||
|
||||
* stage2/shared.h (ERR_NO_DISK_SPACE): New constant.
|
||||
|
|
|
@ -877,15 +877,15 @@ displayapm_func (char *arg, int flags)
|
|||
{
|
||||
if (mbi.flags & MB_INFO_APM_TABLE)
|
||||
{
|
||||
grub_printf ("APM BIOS information:
|
||||
Version: 0x%x
|
||||
32-bit CS: 0x%x
|
||||
Offset: 0x%x
|
||||
16-bit CS: 0x%x
|
||||
16-bit DS: 0x%x
|
||||
32-bit CS length: 0x%x
|
||||
16-bit CS length: 0x%x
|
||||
16-bit DS length: 0x%x\n",
|
||||
grub_printf ("APM BIOS information:\n"
|
||||
" Version: 0x%x\n"
|
||||
" 32-bit CS: 0x%x\n"
|
||||
" Offset: 0x%x\n"
|
||||
" 16-bit CS: 0x%x\n"
|
||||
" 16-bit DS: 0x%x\n"
|
||||
" 32-bit CS length: 0x%x\n"
|
||||
" 16-bit CS length: 0x%x\n"
|
||||
" 16-bit DS length: 0x%x\n",
|
||||
(unsigned) apm_bios_info.version,
|
||||
(unsigned) apm_bios_info.cseg,
|
||||
apm_bios_info.offset,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* cmdline.c - the device-independent GRUB text command line */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -49,10 +49,9 @@ skip_to (int after_equal, char *cmdline)
|
|||
void
|
||||
print_cmdline_message (int forever)
|
||||
{
|
||||
printf ("\
|
||||
[ Minimal BASH-like line editing is supported. For the first word, TAB
|
||||
lists possible command completions. Anywhere else TAB lists the possible
|
||||
completions of a device/filename.%s ]\n",
|
||||
printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n"
|
||||
" lists possible command completions. Anywhere else TAB lists the possible\n"
|
||||
" completions of a device/filename.%s ]\n",
|
||||
(forever ? "" : " ESC at any time exits."));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ struct divisor
|
|||
};
|
||||
|
||||
/* Store the port number of a serial unit. */
|
||||
static unsigned short serial_port = -1;
|
||||
static unsigned short serial_port = 0;
|
||||
|
||||
/* The table which lists common configurations. */
|
||||
static struct divisor divisor_tab[] =
|
||||
|
@ -106,7 +106,7 @@ serial_putchar (int c)
|
|||
int
|
||||
serial_exists (void)
|
||||
{
|
||||
return serial_port != -1;
|
||||
return serial_port != 0;
|
||||
}
|
||||
|
||||
/* Return the port number for the UNITth serial device. */
|
||||
|
|
|
@ -434,6 +434,7 @@ imps_read_config_table (unsigned start, int count)
|
|||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
start += 8;
|
||||
}
|
||||
|
|
20
util/mbchk.c
20
util/mbchk.c
|
@ -1,6 +1,6 @@
|
|||
/* mbchk - a simple checker for the format of a Multiboot kernel */
|
||||
/*
|
||||
* Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <getopt.h>
|
||||
#include <multiboot.h>
|
||||
|
||||
|
@ -39,15 +40,14 @@ usage (int status)
|
|||
if (status)
|
||||
fprintf (stderr, "Try ``mbchk --help'' for more information.\n");
|
||||
else
|
||||
printf ("Usage: mbchk [OPTION]... [FILE]...
|
||||
Check if the format of FILE complies with the Multiboot Specification.
|
||||
|
||||
-q, --quiet suppress all normal output
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit.
|
||||
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
");
|
||||
printf ("Usage: mbchk [OPTION]... [FILE]...\n"
|
||||
"Check if the format of FILE complies with the Multiboot Specification.\n"
|
||||
"\n"
|
||||
"-q, --quiet suppress all normal output\n"
|
||||
"-h, --help display this help and exit\n"
|
||||
"-v, --version output version information and exit.\n"
|
||||
"\n"
|
||||
"Report bugs to <bug-grub@gnu.org>.\n");
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue