[PATCH wayland] scanner: Reword fallthrough comment to quiet GCC

Daniel Stone daniels at collabora.com
Fri Mar 17 17:36:57 UTC 2017


GCC 7 now requires an explicit comment noting that case statements
without a break fall through. We already had one of those in the
scanner, but GCC wasn't smart enough to pick it up.

Quiet the warning by making the comment less elaborate.

Signed-off-by: Daniel Stone <daniels at collabora.com>
---
 src/scanner.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/scanner.c b/src/scanner.c
index a6c334fb..517068c4 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -740,9 +740,7 @@ start_element(void *data, const char *element_name, const char **atts)
 		switch (arg->type) {
 		case NEW_ID:
 			ctx->message->new_id_count++;
-
-			/* Fall through to OBJECT case. */
-
+			/* fallthrough */
 		case OBJECT:
 			if (interface_name)
 				arg->interface_name = xstrdup(interface_name);
-- 
2.12.0



More information about the wayland-devel mailing list