From: Thomas Huth Subject: [kvm-unit-tests PATCH 3/3] Mark some local functions as "static" Date: Thu, 29 Jun 2017 20:42:53 +0200 Message-ID: <1498761773-11164-4-git-send-email-thuth@redhat.com> References: <1498761773-11164-1-git-send-email-thuth@redhat.com> Cc: David Hildenbrand , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Laurent Vivier , Drew Jones To: kvm@vger.kernel.org, Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55040 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868AbdF2SnU (ORCPT ); Thu, 29 Jun 2017 14:43:20 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 666A1164C74 for ; Thu, 29 Jun 2017 18:43:20 +0000 (UTC) In-Reply-To: <1498761773-11164-1-git-send-email-thuth@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Discovered while compiling kvm-unit-tests with the "-Wmissing-prototypes" parameter of GCC. Signed-off-by: Thomas Huth --- NB: There's more to do to make the whole code compilable with "-Wmissing-prototypes" ... not sure whether we really want all that, but at least these spots in this patch here seemed to make sense to me. arm/pmu.c | 2 +- lib/pci-testdev.c | 4 ++-- lib/printf.c | 8 ++++---- lib/x86/fwcfg.c | 2 +- s390x/intercept.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arm/pmu.c b/arm/pmu.c index 1ac6920..1de7d77 100644 --- a/arm/pmu.c +++ b/arm/pmu.c @@ -276,7 +276,7 @@ static void pmccntr64_test(void) } /* Return FALSE if no PMU found, otherwise return TRUE */ -bool pmu_probe(void) +static bool pmu_probe(void) { pmu_version = get_pmu_version(); report_info("PMU version: %d", pmu_version); diff --git a/lib/pci-testdev.c b/lib/pci-testdev.c index 7d298e6..039bb44 100644 --- a/lib/pci-testdev.c +++ b/lib/pci-testdev.c @@ -131,8 +131,8 @@ static bool pci_testdev_one(struct pci_test_dev_hdr *test, return (int)count == nr_writes; } -void pci_testdev_print(struct pci_test_dev_hdr *test, - struct pci_testdev_ops *ops) +static void pci_testdev_print(struct pci_test_dev_hdr *test, + struct pci_testdev_ops *ops) { bool io = (ops == &pci_testdev_io_ops); int i; diff --git a/lib/printf.c b/lib/printf.c index bfe05f5..1269723 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -30,7 +30,7 @@ static void addchar(pstream_t *p, char c) ++p->added; } -void print_str(pstream_t *p, const char *s, strprops_t props) +static void print_str(pstream_t *p, const char *s, strprops_t props) { const char *s_orig = s; int npad = props.npad; @@ -58,7 +58,7 @@ void print_str(pstream_t *p, const char *s, strprops_t props) static char digits[16] = "0123456789abcdef"; -void print_int(pstream_t *ps, long long n, int base, strprops_t props) +static void print_int(pstream_t *ps, long long n, int base, strprops_t props) { char buf[sizeof(long) * 3 + 2], *p = buf; int s = 0, i; @@ -92,8 +92,8 @@ void print_int(pstream_t *ps, long long n, int base, strprops_t props) print_str(ps, buf, props); } -void print_unsigned(pstream_t *ps, unsigned long long n, int base, - strprops_t props) +static void print_unsigned(pstream_t *ps, unsigned long long n, int base, + strprops_t props) { char buf[sizeof(long) * 3 + 3], *p = buf; int i; diff --git a/lib/x86/fwcfg.c b/lib/x86/fwcfg.c index e2cdd15..c52b445 100644 --- a/lib/x86/fwcfg.c +++ b/lib/x86/fwcfg.c @@ -3,7 +3,7 @@ static struct spinlock lock; -uint64_t fwcfg_get_u(uint16_t index, int bytes) +static uint64_t fwcfg_get_u(uint16_t index, int bytes) { uint64_t r = 0; uint8_t b; diff --git a/s390x/intercept.c b/s390x/intercept.c index 9766289..59e5fca 100644 --- a/s390x/intercept.c +++ b/s390x/intercept.c @@ -182,7 +182,7 @@ struct { { NULL, NULL, false } }; -void parse_intercept_test_args(int argc, char **argv) +static void parse_intercept_test_args(int argc, char **argv) { int i, ti; bool run_all = true; -- 1.8.3.1