commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-79-ga9d1ed


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-79-ga9d1edf
Date: Fri, 21 Feb 2020 11:50:43 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  a9d1edfd4701b590a9519498ef5514492520be76 (commit)
      from  c1f18548f754bf09865fa17af119e5f90d931094 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=a9d1edfd4701b590a9519498ef5514492520be76


commit a9d1edfd4701b590a9519498ef5514492520be76
Author: Mats Erik Andersson <address@hidden>
Date:   Fri Feb 21 17:47:49 2020 +0100

    Various compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index 7358295..287f5ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2020-02-21  Mats Erik Andersson  <address@hidden>
+
+       Various compiler warnings, getting closer to `-Werror'.
+
+       * libls/print.c (printlong): The functions major() and minor() have
+       no portable value type, so cast as `int'.
+
+       * ping/ping.c (decode_type): Initialize HOSTNAME to NULL.
+
+       * src/hostname.c (parse_opt, main) <SET_NAME_ACTION>: The prototype
+       of sethostname() is not portable, so cast as `void *'.  Do this
+       also on both members in a conditional clause.
+       * src/logger.c (parse_level): Cast PRIORITYNAMES and FACILITYNAMES
+       as `CODE *', since BSD-systems assign these a constant type.
+       * src/syslogd.c (textpri, cfline): Likewise.
+       * src/rcp.c (source, rsource): Type length of `stat.st_mode' is not
+       portable, so cast as `int'.
+       * src/traceroute.c (trace_write): Make loop variable I unsigned.
+
 2020-02-20  Mats Erik Andersson  <address@hidden>
 
        rexecd, rshd: Avoid false failure message.
diff --git a/libls/print.c b/libls/print.c
index d277051..aad5704 100644
--- a/libls/print.c
+++ b/libls/print.c
@@ -137,7 +137,7 @@ printlong (DISPLAY *dp)
       if (f_flags)
        printf ("%-*s ", dp->s_flags, np->flags);
       if (S_ISCHR (sp->st_mode) || S_ISBLK (sp->st_mode))
-       printf ("%3d, %3d ", major (sp->st_rdev), minor (sp->st_rdev));
+       printf ("%3d, %3d ", (int) major (sp->st_rdev), (int) minor 
(sp->st_rdev));
       else if (dp->bcfile)
        printf ("%*s%*llu ",
                8 - dp->s_size, "", dp->s_size, (long long) sp->st_size);
diff --git a/ping/ping.c b/ping/ping.c
index f98f87e..c8b67a1 100644
--- a/ping/ping.c
+++ b/ping/ping.c
@@ -333,7 +333,7 @@ main (int argc, char **argv)
 
 int (*decode_type (const char *arg)) (char *hostname)
 {
-  int (*ping_type) (char *hostname);
+  int (*ping_type) (char *hostname) = NULL;
 
   if (strcasecmp (arg, "echo") == 0)
     ping_type = ping_echo;
diff --git a/src/hostname.c b/src/hostname.c
index e0c24db..bf432fd 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -90,7 +90,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
       break;
 
     case 'F':
-      set_name_action = sethostname;
+      set_name_action = (void *) sethostname;
       args->hostname_file = arg;
       break;
 
@@ -115,7 +115,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
       break;
 
     case ARGP_KEY_ARG:
-      set_name_action = sethostname;
+      set_name_action = (void *) sethostname;
       args->hostname_new = strdup (arg);
       if (args->hostname_new == NULL)
         error (EXIT_FAILURE, errno, "strdup");
@@ -159,7 +159,7 @@ main (int argc, char *argv[])
 
   if (get_name_action == xgetdomainname || get_name_action == xgethostname)
     get_name (&args);
-  else if (set_name_action == sethostname)
+  else if ((void *) set_name_action == (void *) sethostname)
     set_name (&args);
 
   return 0;
diff --git a/src/logger.c b/src/logger.c
index cce6b3a..dcc4f8d 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -114,9 +114,9 @@ parse_level (char *str)
   if (p)
     *p++ = 0;
 
-  fac = decode (str, facilitynames, "facility");
+  fac = decode (str, (CODE *) facilitynames, "facility");
   if (p)
-    prio = decode (p, prioritynames, "priority");
+    prio = decode (p, (CODE *) prioritynames, "priority");
 
   return MAKE_PRI (fac, prio);
 }
diff --git a/src/rcp.c b/src/rcp.c
index 503027e..4cfdeaf 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -744,7 +744,7 @@ source (int argc, char *argv[])
        }
 #define RCP_MODEMASK   (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
       snprintf (buf, sizeof buf, "C%04o %jd %s\n",
-               stb.st_mode & RCP_MODEMASK, (intmax_t) stb.st_size, last);
+               (int) stb.st_mode & RCP_MODEMASK, (intmax_t) stb.st_size, last);
       write (rem, buf, strlen (buf));
       if (response () < 0)
        goto next;
@@ -829,7 +829,7 @@ rsource (char *name, struct stat *statp)
       return;
     }
 
-  sprintf (buf, "D%04o %d %s\n", statp->st_mode & RCP_MODEMASK, 0, last);
+  sprintf (buf, "D%04o %d %s\n", (int) statp->st_mode & RCP_MODEMASK, 0, last);
   write (rem, buf, strlen (buf));
   free (buf);
 
diff --git a/src/syslogd.c b/src/syslogd.c
index e7ab9d8..cb27d95 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1155,9 +1155,9 @@ textpri (int pri)
   static char res[20];
   CODE *c_pri, *c_fac;
 
-  for (c_fac = facilitynames; c_fac->c_name
+  for (c_fac = (CODE *) facilitynames; c_fac->c_name
        && !(c_fac->c_val == LOG_FAC (pri) << 3); c_fac++);
-  for (c_pri = prioritynames; c_pri->c_name
+  for (c_pri = (CODE *) prioritynames; c_pri->c_name
        && !(c_pri->c_val == LOG_PRI (pri)); c_pri++);
 
   snprintf (res, sizeof (res), "%s.%s", c_fac->c_name, c_pri->c_name);
@@ -2258,7 +2258,7 @@ cfline (const char *line, struct filed *f)
        }
       else
        {
-         pri = decode (bp, prioritynames);
+         pri = decode (bp, (CODE *) prioritynames);
          if (pri < 0 || (pri > LOG_PRIMASK && pri != INTERNAL_NOPRI))
            {
              snprintf (ebuf, sizeof (ebuf),
@@ -2304,7 +2304,7 @@ cfline (const char *line, struct filed *f)
              }
          else
            {
-             i = decode (buf, facilitynames);
+             i = decode (buf, (CODE *) facilitynames);
 
              if (i < 0 || i > (LOG_NFACILITIES << 3))
                {
diff --git a/src/traceroute.c b/src/traceroute.c
index 7d59f00..8d52bf2 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -701,7 +701,7 @@ trace_write (trace_t * t)
     case TRACE_ICMP:
       {
        icmphdr_t hdr;
-       int i;
+       unsigned int i;
 
        /* Deposit deterministic values throughout the header!  */
        for (i = 0; i < sizeof (hdr); ++i)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        | 19 +++++++++++++++++++
 libls/print.c    |  2 +-
 ping/ping.c      |  2 +-
 src/hostname.c   |  6 +++---
 src/logger.c     |  4 ++--
 src/rcp.c        |  4 ++--
 src/syslogd.c    |  8 ++++----
 src/traceroute.c |  2 +-
 8 files changed, 33 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]