[Skiboot] [PATCH 3/6] gard: enable building with skiboot HOSTCFLAGS warnings

Stewart Smith stewart at linux.vnet.ibm.com
Mon Jul 17 19:13:57 AEST 2017


Mostly unused parameter warnings due to callbacks

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 external/gard/gard.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/external/gard/gard.c b/external/gard/gard.c
index 32a0003f4811..c5cb93b8830a 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -260,6 +260,9 @@ static int do_iterate(struct gard_ctx *ctx,
 
 static int get_largest_pos_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, void *priv)
 {
+	(void)ctx;
+	(void)gard;
+
 	if (!priv)
 		return -1;
 
@@ -272,6 +275,8 @@ static int get_largest_pos(struct gard_ctx *ctx)
 {
 	int rc, largest = -1;
 
+	(void)ctx;
+
 	rc = do_iterate(ctx, &get_largest_pos_i, &largest);
 	if (rc)
 		return -1;
@@ -281,6 +286,9 @@ static int get_largest_pos(struct gard_ctx *ctx)
 
 static int count_valid_records_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, void *priv)
 {
+	(void)ctx;
+	(void)pos;
+
 	if (!gard || !priv)
 		return -1;
 
@@ -303,6 +311,10 @@ static int count_valid_records(struct gard_ctx *ctx)
 
 static int do_list_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, void *priv)
 {
+	(void)ctx;
+	(void)pos;
+	(void)priv;
+
 	if (!gard)
 		return -1;
 
@@ -317,6 +329,9 @@ static int do_list(struct gard_ctx *ctx, int argc, char **argv)
 {
 	int rc;
 
+	(void)argc;
+	(void)argv;
+
 	/* No entries */
 	if (count_valid_records(ctx) == 0) {
 		printf("No GARD entries to display\n");
@@ -335,6 +350,9 @@ static int do_show_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, vo
 {
 	uint32_t id;
 
+	(void)ctx;
+	(void)pos;
+
 	if (!priv || !gard)
 		return -1;
 
@@ -477,7 +495,7 @@ static int do_clear(struct gard_ctx *ctx, int argc, char **argv)
 	return rc;
 }
 
-int check_gard_partition(struct gard_ctx *ctx)
+static int check_gard_partition(struct gard_ctx *ctx)
 {
 	int rc;
 	struct gard_record gard;
@@ -520,6 +538,8 @@ int check_gard_partition(struct gard_ctx *ctx)
 __attribute__ ((unused))
 static int do_nop(struct gard_ctx *ctx, int argc, char **argv)
 {
+	(void)ctx;
+	(void)argc;
 	fprintf(stderr, "Unimplemented action '%s'\n", argv[0]);
 	return EXIT_SUCCESS;
 }
-- 
2.13.0



More information about the Skiboot mailing list