From 0b3631c9a406c5360b8e4d6425e09cd7c0e0e039 Mon Sep 17 00:00:00 2001 From: YoungHun Kim Date: Wed, 5 Jun 2024 19:17:36 +0900 Subject: [PATCH] Fix build error for gcc upgrade -Wimplicit-function-declaration -Wimplicit-fallthrough Change-Id: Ifff0e146430b6b8d317a5a1198d9346e7ab030a8 --- packaging/murphy.spec | 2 +- src/common/dgram-transport.c | 1 + src/common/native-types.c | 2 ++ src/common/stream-transport.c | 1 + src/plugins/resource-native/resource-client.c | 1 + src/resource/protocol.h | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packaging/murphy.spec b/packaging/murphy.spec index bf2803e..017f6c9 100644 --- a/packaging/murphy.spec +++ b/packaging/murphy.spec @@ -29,7 +29,7 @@ Summary: Resource policy framework Name: murphy Version: 0.0.75 -Release: 29 +Release: 30 License: BSD-3-Clause Group: System/Service URL: http://01.org/murphy/ diff --git a/src/common/dgram-transport.c b/src/common/dgram-transport.c index b54ed62..262be06 100644 --- a/src/common/dgram-transport.c +++ b/src/common/dgram-transport.c @@ -127,6 +127,7 @@ static int parse_address(const char *str, int *familyp, char *nodep, nl = service - node; service++; + break; case AF_INET6: service = strrchr(node, ':'); diff --git a/src/common/native-types.c b/src/common/native-types.c index d9890e3..6f752b7 100644 --- a/src/common/native-types.c +++ b/src/common/native-types.c @@ -776,6 +776,7 @@ static int encode_array(mrp_tlv_t *tlv, void *arrp, mrp_native_array_t *m, switch (t->id) { case MRP_TYPE_STRING: v = *(void **)elem; + /* fall through */ case MRP_TYPE_INT8: case MRP_TYPE_UINT8: case MRP_TYPE_INT16: @@ -1426,6 +1427,7 @@ static int print_array(char **bufp, size_t *sizep, int level, switch (et->id) { case MRP_TYPE_STRING: v = *(void **)elem; + /* fall through */ case MRP_TYPE_INT8: case MRP_TYPE_UINT8: case MRP_TYPE_INT16: diff --git a/src/common/stream-transport.c b/src/common/stream-transport.c index d8ee1e6..6e085b0 100644 --- a/src/common/stream-transport.c +++ b/src/common/stream-transport.c @@ -119,6 +119,7 @@ static int parse_address(const char *str, int *familyp, char *nodep, nl = service - node; service++; + break; case AF_INET6: service = strrchr(node, ':'); diff --git a/src/plugins/resource-native/resource-client.c b/src/plugins/resource-native/resource-client.c index a920eb3..122b370 100644 --- a/src/plugins/resource-native/resource-client.c +++ b/src/plugins/resource-native/resource-client.c @@ -1693,6 +1693,7 @@ static void parse_arguments(client_t *client, int argc, char **argv) switch (opt) { case 'h': usage(client, 0); + break; case 'v': client->msgdump = true; break; diff --git a/src/resource/protocol.h b/src/resource/protocol.h index 30c7691..a243c07 100644 --- a/src/resource/protocol.h +++ b/src/resource/protocol.h @@ -34,6 +34,7 @@ #include #include #include +#include #include -- 2.34.1