]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix fall-through warnings in sunrpc/xdr.c.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 14 Feb 2019 20:35:16 +0000 (20:35 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 14 Feb 2019 20:35:16 +0000 (20:35 +0000)
This patch fixes implicit-fallthrough warnings in sunrpc/xdr.c when
building with -Wextra.  A fall-through comment is added in three
places; in two other places, an existing comment is reworded so it
matches the default patterns used by -Wimplicit-fallthrough.

Tested for x86_64.

* sunrpc/xdr.c (xdr_int): Add fall-through comment.
(xdr_u_int): Likewise.
(xdr_enum): Likewise.
(xdr_bytes): Reword fall-through comment.
(xdr_string): Likewise.

ChangeLog
sunrpc/xdr.c

index b6612b74dffdb344613b0ebd436e24a72bd36996..d9852ab95c38f63cf6dd43af43fe7d58ffcd171b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-02-14  Joseph Myers  <joseph@codesourcery.com>
+
+       * sunrpc/xdr.c (xdr_int): Add fall-through comment.
+       (xdr_u_int): Likewise.
+       (xdr_enum): Likewise.
+       (xdr_bytes): Reword fall-through comment.
+       (xdr_string): Likewise.
+
 2019-02-14  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        [BZ #2421]
index 8b0b91995b79b859a8ff12d81f1720368b645b16..b5fb7455e2822cec344ebdc50a0f44667fbae615 100644 (file)
@@ -113,6 +113,7 @@ xdr_int (XDR *xdrs, int *ip)
          return FALSE;
        }
       *ip = (int) l;
+      /* Fall through.  */
     case XDR_FREE:
       return TRUE;
     }
@@ -152,6 +153,7 @@ xdr_u_int (XDR *xdrs, u_int *up)
          return FALSE;
        }
       *up = (u_int) (u_long) l;
+      /* Fall through.  */
     case XDR_FREE:
       return TRUE;
     }
@@ -506,6 +508,7 @@ xdr_enum (XDR *xdrs, enum_t *ep)
              return FALSE;
            }
          *ep = l;
+         /* Fall through.  */
        case XDR_FREE:
          return TRUE;
 
@@ -628,7 +631,7 @@ xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
          (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
          return FALSE;
        }
-      /* fall into ... */
+      /* Fall through.  */
 
     case XDR_ENCODE:
       return xdr_opaque (xdrs, sp, nodesize);
@@ -789,7 +792,7 @@ xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
          return FALSE;
        }
       sp[size] = 0;
-      /* fall into ... */
+      /* Fall through.  */
 
     case XDR_ENCODE:
       return xdr_opaque (xdrs, sp, size);