summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2004-02-24 13:50:19 +0000
committerPaul Smith <psmith@gnu.org>2004-02-24 13:50:19 +0000
commitf29b86c314e6e2b44a1eb83f1b44a3849d82655e (patch)
tree0e83f1ad4a44542b088878e8b9d6de48f16e949d /main.c
parentbe8c3dbc974c35fac33c8392b89482c10e4f8650 (diff)
downloadgunmake-f29b86c314e6e2b44a1eb83f1b44a3849d82655e.tar.gz
Many compiler warning cleanups.
Small fixes for W32 (from Jonathan Grant <jg-make@jguk.org>) Maintainer enhancements to clean up the tree.
Diffstat (limited to 'main.c')
-rw-r--r--main.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/main.c b/main.c
index 96bb430..0c29af6 100644
--- a/main.c
+++ b/main.c
@@ -389,7 +389,7 @@ static const struct command_switch switches[] =
{ 'W', string, (char *) &new_files, 0, 0, 0, 0, 0, "what-if" },
{ CHAR_MAX+4, flag, (char *) &warn_undefined_variables_flag, 1, 1, 0, 0, 0,
"warn-undefined-variables" },
- { '\0', }
+ { 0 }
};
/* Secondary long names for options. */
@@ -545,7 +545,7 @@ enter_command_line_file (char *name)
/* Toggle -d on receipt of SIGUSR1. */
static RETSIGTYPE
-debug_signal_handler (int sig)
+debug_signal_handler (int sig UNUSED)
{
db_level = db_level ? DB_NONE : DB_BASIC;
}
@@ -834,8 +834,8 @@ main (int argc, char **argv, char **envp)
#endif
{
static char *stdin_nm = 0;
- register struct file *f;
- register unsigned int i;
+ struct file *f;
+ int i;
char **p;
struct dep *read_makefiles;
PATH_VAR (current_directory);
@@ -1510,9 +1510,10 @@ main (int argc, char **argv, char **envp)
if (jobserver_fds)
{
char *cp;
+ unsigned int ui;
- for (i=1; i < jobserver_fds->idx; ++i)
- if (!streq (jobserver_fds->list[0], jobserver_fds->list[i]))
+ for (ui=1; ui < jobserver_fds->idx; ++ui)
+ if (!streq (jobserver_fds->list[0], jobserver_fds->list[ui]))
fatal (NILF, _("internal error: multiple --jobserver-fds options"));
/* Now parse the fds string and make sure it has the proper format. */
@@ -1743,7 +1744,7 @@ main (int argc, char **argv, char **envp)
/* Nonzero if any makefile we care about failed
in updating or could not be found at all. */
int any_failed = 0;
- register unsigned int i;
+ unsigned int i;
struct dep *d;
for (i = 0, d = read_makefiles; d != 0; ++i, d = d->next)
@@ -1817,7 +1818,7 @@ main (int argc, char **argv, char **envp)
if (makefiles != 0)
{
/* These names might have changed. */
- register unsigned int i, j = 0;
+ int i, j = 0;
for (i = 1; i < argc; ++i)
if (strneq (argv[i], "-f", 2)) /* XXX */
{
@@ -2021,9 +2022,9 @@ static struct option long_options[(sizeof (switches) / sizeof (switches[0])) +
static void
init_switches (void)
{
- register char *p;
- register int c;
- register unsigned int i;
+ char *p;
+ unsigned int c;
+ unsigned int i;
if (options[0] != '\0')
/* Already done. */