From patchwork Thu Feb 14 18:39:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 31481 Received: (qmail 72371 invoked by alias); 14 Feb 2019 18:40:05 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 72363 invoked by uid 89); 14 Feb 2019 18:40:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Thu, 14 Feb 2019 18:39:58 +0000 From: Joseph Myers To: Subject: Fix fall-through warnings in sunrpc/xdr.c Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 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. 2019-02-14 Joseph Myers * 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. diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index 8b0b91995b..b5fb7455e2 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -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);