From patchwork Fri Feb 14 10:39:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11382085 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 926761580 for ; Fri, 14 Feb 2020 10:40:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 780FF2067D for ; Fri, 14 Feb 2020 10:40:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 780FF2067D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j2YNR-0004zS-Ou; Fri, 14 Feb 2020 10:39:17 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j2YNQ-0004zN-6O for xen-devel@lists.xenproject.org; Fri, 14 Feb 2020 10:39:16 +0000 X-Inumbo-ID: 3e27c3f9-4f16-11ea-b9ff-12813bfff9fa Received: from mail-wr1-f68.google.com (unknown [209.85.221.68]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3e27c3f9-4f16-11ea-b9ff-12813bfff9fa; Fri, 14 Feb 2020 10:39:15 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id k11so10312318wrd.9 for ; Fri, 14 Feb 2020 02:39:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=otVA7I+orJUrwi6e4ebrLcEm0uIL+E+BddGVLGGzYOU=; b=KexOu4MaeISAmNAq0AGjwRILP3OWyOBYTGZQn+AcuqWapEJ4luUUQ1publnSx2jmUP XRtbbaWtZuXvKExDJ09tg94tfg2uBbeh765z7fgdkvhPKs6+JzI9NR9epMzSFk3oxvka DroND6agLYoTTUY3r/a6wGj/rJPmfaYI7L92MQbTKyb0+IaXSruBUCAs+bZz6+wM7OHP lR7z9EEbfJebUYptccUX1NkCxRRtWCKuGFd2aFR8W+rhzjWMSLK9MenBAwnKMD3i44uI KYnHxU9DcgK3lJW5qtXRhggEZ8oxljqv5egc/IKdaY5IZDT/7Y9c+l+INiQQbDuMNy9O Bvdw== X-Gm-Message-State: APjAAAWe6C4pzV7VYgtW/c1GL7glKrfZTE4ulBGW+CZYCjP+vWSplkE9 JXVfYCa9gbHju4jDWok3u7LuRNdA97E= X-Google-Smtp-Source: APXvYqxCvZKMwlVzLCF3yqPIzXsTfMP9/Z4JgkTHt6PBQ6FCScCPe2b1tJreu/Jqgd6vJ1ZiLIebOQ== X-Received: by 2002:a5d:6802:: with SMTP id w2mr3287417wru.353.1581676754401; Fri, 14 Feb 2020 02:39:14 -0800 (PST) Received: from localhost.localdomain (41.142.6.51.dyn.plus.net. [51.6.142.41]) by smtp.gmail.com with ESMTPSA id n13sm6977381wmd.21.2020.02.14.02.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 02:39:13 -0800 (PST) From: Wei Liu To: Xen Development List Date: Fri, 14 Feb 2020 10:39:11 +0000 Message-Id: <20200214103911.7995-1-wl@xen.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] libxl: mark parameters in stub functions as unused X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Andrew Cooper , Ian Jackson , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hopefully this can fix issues like: In file included from ../../src/libxl/xen_xl.c:24:0: /home/osstest/build.147035.build-amd64-libvirt/xendist/usr/local/include/libxl.h: In function 'libxl_cpuid_apply_policy': /home/osstest/build.147035.build-amd64-libvirt/xendist/usr/local/include/libxl.h:2345:56: error: unused parameter 'ctx' [-Werror=unused-parameter] static inline void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) {} Fixes: dacb80f9 ("tools/libxl: Remove libxl_cpuid_{set,apply_policy}() from the API") Signed-off-by: Wei Liu Acked-by: Ian Jackson --- Not able to test this locally, please review carefully... --- tools/libxl/libxl.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index d1d31b1e67..fde8548847 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -2342,9 +2342,13 @@ int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid, * change in some cases for existing software, but there is 0 of that in * practice. */ -static inline void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) {} -static inline void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid, - libxl_cpuid_policy_list cpuid) {} +static inline void libxl_cpuid_apply_policy(libxl_ctx *ctx __attribute__((unused)), + uint32_t domid __attribute__((unused))) +{} +static inline void libxl_cpuid_set(libxl_ctx *ctx __attribute__((unused)), + uint32_t domid __attribute__((unused)), + libxl_cpuid_policy_list cpuid __attribute__((unused))) +{} #endif /*