Cleanup some source and fix autoconf warnings.
authorPaul Smith <psmith@gnu.org>
Tue, 16 Apr 2013 05:47:05 +0000 (01:47 -0400)
committerPaul Smith <psmith@gnu.org>
Tue, 16 Apr 2013 05:47:05 +0000 (01:47 -0400)
configure.ac
dir.c
rule.c

index beaad13066a0baf0d488653dfe2882974aee4e20..2ba81adc6f7e566b5691496a949ec6e5c0e08a99 100644 (file)
@@ -141,7 +141,7 @@ AS_IF([test "$ac_cv_func_gettimeofday" = yes],
 ])
 
 AC_CHECK_FUNCS([strdup strndup mkstemp mktemp fdopen fileno \
-               dup2 getcwd realpath sigsetmask sigaction \
+               dup dup2 getcwd realpath sigsetmask sigaction \
                 getgroups seteuid setegid setlinebuf setreuid setregid \
                 getrlimit setrlimit setvbuf pipe strerror strsignal \
                lstat readlink atexit])
@@ -351,13 +351,13 @@ AS_IF([test "$make_cv_load" = yes], [
   AC_MSG_CHECKING([If the linker accepts -Wl,--export-dynamic])
   old_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-  AC_LINK_IFELSE([int main(){}],
+  AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
     [AC_MSG_RESULT([yes])
      AC_SUBST([AM_LDFLAGS], [-Wl,--export-dynamic])],
     [AC_MSG_RESULT([no])
      AC_MSG_CHECKING([If the linker accepts -rdynamic])
      LDFLAGS="$old_LDFLAGS -rdynamic"
-     AC_LINK_IFELSE([int main(){}],
+     AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
        [AC_MSG_RESULT([yes])
         AC_SUBST([AM_LDFLAGS], [-rdynamic])],
        [AC_MSG_RESULT([no])])
diff --git a/dir.c b/dir.c
index 69eeb48179e32030eabd5ae59e0d73a32b8367e9..59b2a8c73ccdf12f6713eb6788297d4a1bfa5aa5 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -581,7 +581,6 @@ static int
 dir_contents_file_exists_p (struct directory_contents *dir,
                             const char *filename)
 {
-  unsigned int hash;
   struct dirfile *df;
   struct dirent *d;
 #ifdef WINDOWS32
@@ -610,7 +609,6 @@ dir_contents_file_exists_p (struct directory_contents *dir,
   filename = vmsify (filename,0);
 #endif
 
-  hash = 0;
   if (filename != 0)
     {
       struct dirfile dirfile_key;
diff --git a/rule.c b/rule.c
index 7627225f2fcd2e7188fe0f9274ce1cb337dfa226..c58ef40c6425e9949353929a2214f0cad059521b 100644 (file)
--- a/rule.c
+++ b/rule.c
@@ -70,7 +70,7 @@ count_implicit_rule_limits (void)
 {
   char *name;
   int namelen;
-  struct rule *rule, *lastrule;
+  struct rule *rule;
 
   num_pattern_rules = max_pattern_targets = max_pattern_deps = 0;
   max_pattern_dep_length = 0;
@@ -78,7 +78,6 @@ count_implicit_rule_limits (void)
   name = 0;
   namelen = 0;
   rule = pattern_rules;
-  lastrule = 0;
   while (rule != 0)
     {
       unsigned int ndeps = 0;
@@ -138,7 +137,6 @@ count_implicit_rule_limits (void)
       if (ndeps > max_pattern_deps)
        max_pattern_deps = ndeps;
 
-      lastrule = rule;
       rule = next;
     }