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>
|
2001-12-10 Yoshinori K. Okuji <okuji@gnu.org>
|
||||||
|
|
||||||
* stage2/shared.h (ERR_NO_DISK_SPACE): New constant.
|
* 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)
|
if (mbi.flags & MB_INFO_APM_TABLE)
|
||||||
{
|
{
|
||||||
grub_printf ("APM BIOS information:
|
grub_printf ("APM BIOS information:\n"
|
||||||
Version: 0x%x
|
" Version: 0x%x\n"
|
||||||
32-bit CS: 0x%x
|
" 32-bit CS: 0x%x\n"
|
||||||
Offset: 0x%x
|
" Offset: 0x%x\n"
|
||||||
16-bit CS: 0x%x
|
" 16-bit CS: 0x%x\n"
|
||||||
16-bit DS: 0x%x
|
" 16-bit DS: 0x%x\n"
|
||||||
32-bit CS length: 0x%x
|
" 32-bit CS length: 0x%x\n"
|
||||||
16-bit CS length: 0x%x
|
" 16-bit CS length: 0x%x\n"
|
||||||
16-bit DS length: 0x%x\n",
|
" 16-bit DS length: 0x%x\n",
|
||||||
(unsigned) apm_bios_info.version,
|
(unsigned) apm_bios_info.version,
|
||||||
(unsigned) apm_bios_info.cseg,
|
(unsigned) apm_bios_info.cseg,
|
||||||
apm_bios_info.offset,
|
apm_bios_info.offset,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* cmdline.c - the device-independent GRUB text command line */
|
/* cmdline.c - the device-independent GRUB text command line */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* 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
|
* 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
|
* 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
|
void
|
||||||
print_cmdline_message (int forever)
|
print_cmdline_message (int forever)
|
||||||
{
|
{
|
||||||
printf ("\
|
printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n"
|
||||||
[ Minimal BASH-like line editing is supported. For the first word, TAB
|
" lists possible command completions. Anywhere else TAB lists the possible\n"
|
||||||
lists possible command completions. Anywhere else TAB lists the possible
|
" completions of a device/filename.%s ]\n",
|
||||||
completions of a device/filename.%s ]\n",
|
|
||||||
(forever ? "" : " ESC at any time exits."));
|
(forever ? "" : " ESC at any time exits."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ struct divisor
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Store the port number of a serial unit. */
|
/* 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. */
|
/* The table which lists common configurations. */
|
||||||
static struct divisor divisor_tab[] =
|
static struct divisor divisor_tab[] =
|
||||||
|
@ -106,7 +106,7 @@ serial_putchar (int c)
|
||||||
int
|
int
|
||||||
serial_exists (void)
|
serial_exists (void)
|
||||||
{
|
{
|
||||||
return serial_port != -1;
|
return serial_port != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the port number for the UNITth serial device. */
|
/* Return the port number for the UNITth serial device. */
|
||||||
|
|
|
@ -434,6 +434,7 @@ imps_read_config_table (unsigned start, int count)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
start += 8;
|
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 */
|
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <multiboot.h>
|
#include <multiboot.h>
|
||||||
|
|
||||||
|
@ -39,15 +40,14 @@ usage (int status)
|
||||||
if (status)
|
if (status)
|
||||||
fprintf (stderr, "Try ``mbchk --help'' for more information.\n");
|
fprintf (stderr, "Try ``mbchk --help'' for more information.\n");
|
||||||
else
|
else
|
||||||
printf ("Usage: mbchk [OPTION]... [FILE]...
|
printf ("Usage: mbchk [OPTION]... [FILE]...\n"
|
||||||
Check if the format of FILE complies with the Multiboot Specification.
|
"Check if the format of FILE complies with the Multiboot Specification.\n"
|
||||||
|
"\n"
|
||||||
-q, --quiet suppress all normal output
|
"-q, --quiet suppress all normal output\n"
|
||||||
-h, --help display this help and exit
|
"-h, --help display this help and exit\n"
|
||||||
-v, --version output version information and exit.
|
"-v, --version output version information and exit.\n"
|
||||||
|
"\n"
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
"Report bugs to <bug-grub@gnu.org>.\n");
|
||||||
");
|
|
||||||
|
|
||||||
exit (status);
|
exit (status);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue