From nobody Mon May 6 20:44:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1560586459; cv=none; d=zoho.com; s=zohoarc; b=iksVekz7owTF9ucuDhYduhzcAlgTxuKmo/h9+pkZCcVfrvBKuDkXs0WI5lvmhnLEOdUGMXrQ7z7mtoz7WdU/bDlEnmpdlS0gj1Eazk2pabOxCVMbM+j9Zy8/uVpyX3j5Xo1MZ7j/TGvv32eX8hoe6LVHdDiOD/VByDLC12b+PNY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560586459; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=ZyywOT12auHjIqwgjo7E+xd6Q8hpB78/GH80jq68S0Y=; b=LLEAO1gRqPfUY8cP+vAgjiltFV4CqEl00S0hI8GtwCU5SB2GrvoL7tQTi7YFkCnZJSo+ol4Kc51qK81xoYRKpG0RLK9/JzDLVAgpiU5f2BXGz8Hfo2W9fZPVrN+KZuqAGU9h3b6ujhchZ1kbnQE/uHjsurwy5QSPYk5e61SJrxU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15605864589865.734423153547027; Sat, 15 Jun 2019 01:14:18 -0700 (PDT) Received: from localhost ([::1]:59250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hc3pH-0006Yd-LA for importer@patchew.org; Sat, 15 Jun 2019 04:14:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49618) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hc3oE-00060B-Es for qemu-devel@nongnu.org; Sat, 15 Jun 2019 04:13:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hc3oD-0006O7-Ee for qemu-devel@nongnu.org; Sat, 15 Jun 2019 04:13:10 -0400 Received: from 6.mo179.mail-out.ovh.net ([46.105.56.76]:34806) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hc3oD-0006MV-7J for qemu-devel@nongnu.org; Sat, 15 Jun 2019 04:13:09 -0400 Received: from player738.ha.ovh.net (unknown [10.109.146.19]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id 5DBF9135878 for ; Sat, 15 Jun 2019 10:13:06 +0200 (CEST) Received: from kaod.org (lfbn-1-10649-41.w90-89.abo.wanadoo.fr [90.89.235.41]) (Authenticated sender: clg@kaod.org) by player738.ha.ovh.net (Postfix) with ESMTPSA id CB4886FD0F74; Sat, 15 Jun 2019 08:13:00 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Sat, 15 Jun 2019 10:12:52 +0200 Message-Id: <20190615081252.28602-1-clg@kaod.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Ovh-Tracer-Id: 12146208196532866022 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudeifecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.56.76 Subject: [Qemu-devel] [PATCH] target/ppc: fix compile error in kvmppc_define_rtas_kernel_token() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" gcc9 reports : In file included from /usr/include/string.h:494, from ./include/qemu/osdep.h:101, from ./target/ppc/kvm.c:17: In function =E2=80=98strncpy=E2=80=99, inlined from =E2=80=98kvmppc_define_rtas_kernel_token=E2=80=99 at ./tar= get/ppc/kvm.c:2648:5: /usr/include/bits/string_fortified.h:106:10: error: =E2=80=98__builtin_strn= cpy=E2=80=99 specified bound 120 equals destination size [-Werror=3Dstringo= p-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__de= st)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ Signed-off-by: C=C3=A9dric Le Goater --- target/ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index d4107dd70d21..9edf4abeaae7 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2645,7 +2645,7 @@ int kvmppc_define_rtas_kernel_token(uint32_t token, c= onst char *function) return -ENOENT; } =20 - strncpy(args.name, function, sizeof(args.name)); + strncpy(args.name, function, sizeof(args.name) - 1); =20 return kvm_vm_ioctl(kvm_state, KVM_PPC_RTAS_DEFINE_TOKEN, &args); } --=20 2.21.0