From patchwork Mon Jul 17 09:13:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 789325 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x9yKw2Y3kz9sRg for ; Mon, 17 Jul 2017 19:14:44 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3x9yKw1j9RzDrDq for ; Mon, 17 Jul 2017 19:14:44 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3x9yKG2ZLxzDrD4 for ; Mon, 17 Jul 2017 19:14:09 +1000 (AEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6H9DZnV014093 for ; Mon, 17 Jul 2017 05:14:07 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0b-001b2d01.pphosted.com with ESMTP id 2brqbyfek3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 17 Jul 2017 05:14:07 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Jul 2017 05:14:06 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 17 Jul 2017 05:14:05 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v6H9E54w14876702; Mon, 17 Jul 2017 09:14:05 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE7A428041; Mon, 17 Jul 2017 05:13:58 -0400 (EDT) Received: from birb.localdomain (unknown [9.185.16.200]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id 6E7C02803D; Mon, 17 Jul 2017 05:13:58 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id D22174EC74B; Mon, 17 Jul 2017 19:14:01 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Mon, 17 Jul 2017 19:13:57 +1000 X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170717091400.21866-1-stewart@linux.vnet.ibm.com> References: <20170717091400.21866-1-stewart@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17071709-0036-0000-0000-0000024A2359 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007376; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00888777; UDB=6.00443881; IPR=6.00668949; BA=6.00005474; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016245; XFM=3.00000015; UTC=2017-07-17 09:14:06 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071709-0037-0000-0000-0000411F08E2 Message-Id: <20170717091400.21866-4-stewart@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-17_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=13 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707170143 Subject: [Skiboot] [PATCH 3/6] gard: enable building with skiboot HOSTCFLAGS warnings X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Mostly unused parameter warnings due to callbacks Signed-off-by: Stewart Smith Reviewed-by: Cyril Bur --- 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; }