@@ -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);
@@ -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;
@@ -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;
@@ -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;
@@ -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;
Discovered while compiling kvm-unit-tests with the "-Wmissing-prototypes" parameter of GCC. Signed-off-by: Thomas Huth <thuth@redhat.com> --- 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(-)