From patchwork Fri Oct 1 07:10:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1535205 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PKU44B+/; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PKU44B+/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HLLq802KZz9sPB for ; Fri, 1 Oct 2021 17:10:28 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HLLq75CdBz2yw1 for ; Fri, 1 Oct 2021 17:10:27 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PKU44B+/; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PKU44B+/; dkim-atps=neutral X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=216.205.24.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=thuth@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PKU44B+/; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PKU44B+/; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (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 4HLLq14Czzz2ybL for ; Fri, 1 Oct 2021 17:10:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633072215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=73zDAPwVsIxDIPkKKZiRsclFOlRbC2KYkKtynWmWwyk=; b=PKU44B+/dFyhCWROpgrDbTMMUIAVaT0xF/fHZh8nbgCBFn8dKcA13zzwGzuvBHtfkiEeEP d4u+H97aFus2tdwtB1Wcqofp8lROlSrrR8LdoFK06QvO7HS5Met/Cdcfk78eLbWIHgm2cf cWCujr6t0xYHXnPuMwCbRdjr7MTI3fE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633072215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=73zDAPwVsIxDIPkKKZiRsclFOlRbC2KYkKtynWmWwyk=; b=PKU44B+/dFyhCWROpgrDbTMMUIAVaT0xF/fHZh8nbgCBFn8dKcA13zzwGzuvBHtfkiEeEP d4u+H97aFus2tdwtB1Wcqofp8lROlSrrR8LdoFK06QvO7HS5Met/Cdcfk78eLbWIHgm2cf cWCujr6t0xYHXnPuMwCbRdjr7MTI3fE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-539-nKhhF0PkOC6X-uXyw58NYQ-1; Fri, 01 Oct 2021 03:10:13 -0400 X-MC-Unique: nKhhF0PkOC6X-uXyw58NYQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8FF781006AA3 for ; Fri, 1 Oct 2021 07:10:12 +0000 (UTC) Received: from thuth.com (dhcp-192-229.str.redhat.com [10.33.192.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F64B6060F for ; Fri, 1 Oct 2021 07:10:11 +0000 (UTC) From: Thomas Huth To: slof@lists.ozlabs.org Date: Fri, 1 Oct 2021 09:10:10 +0200 Message-Id: <20211001071010.941684-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [SLOF] [PATCH] Silence some trivial compiler warning in the js2x code X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" We enabled additional compiler warnings in commit 26d8ba170355c9, but so far we did not address the additional warnings in the js2x code yet. This patch fixes at least some of the trivial warnings there. Signed-off-by: Thomas Huth --- clients/net-snk/kernel/systemcall.c | 2 +- clients/net-snk/oflib/of.c | 2 +- lib/libnvram/nvram.c | 2 +- rtas/flash/block_lists.c | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clients/net-snk/kernel/systemcall.c b/clients/net-snk/kernel/systemcall.c index 52c45ca..01d5f2b 100644 --- a/clients/net-snk/kernel/systemcall.c +++ b/clients/net-snk/kernel/systemcall.c @@ -120,7 +120,7 @@ ssize_t write (int fd, const void *buf, size_t len) char dest_buf[512]; char *dest_buf_ptr; const char *dbuf = buf; - int i; + size_t i; if (fd == 1 || fd == 2) { dest_buf_ptr = &dest_buf[0]; diff --git a/clients/net-snk/oflib/of.c b/clients/net-snk/oflib/of.c index 5c502ac..365191c 100644 --- a/clients/net-snk/oflib/of.c +++ b/clients/net-snk/oflib/of.c @@ -481,7 +481,7 @@ map_one_range(uint64_t *addr, int type, uint32_t *ranges, uint32_t nac, uint64_t cm, size, pm; /* only check for the type if nac == 3 (PCI) */ DEBUG_TR("type %x, nac %x\n", ranges[0], nac); - if (((ranges[0] & 0x03000000) >> 24) != type && nac == 3) + if ((((int)ranges[0] & 0x03000000) >> 24) != type && nac == 3) return -1; /* okay, it is the same type let's see if we find a mapping */ size = get_dt_address(ranges + nac + pnac, nsc); diff --git a/lib/libnvram/nvram.c b/lib/libnvram/nvram.c index 6d145d7..048c583 100644 --- a/lib/libnvram/nvram.c +++ b/lib/libnvram/nvram.c @@ -269,7 +269,7 @@ static uint8_t calc_partition_header_checksum(int offset) return checksum; } -static int calc_used_nvram_space(void) +static unsigned int calc_used_nvram_space(void) { unsigned walk, len; diff --git a/rtas/flash/block_lists.c b/rtas/flash/block_lists.c index e632fd0..d632229 100644 --- a/rtas/flash/block_lists.c +++ b/rtas/flash/block_lists.c @@ -41,6 +41,7 @@ print_progress(void) break; case 0: printf("\b\\"); + /* fallthrough */ default: i = 3; }