[kvm-unit-tests v3 PATCH 3/3] Mark some local functions as "static"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Discovered while compiling kvm-unit-tests with the
"-Wmissing-prototypes" parameter of GCC.

Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
---
 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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux