summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-07-18 16:59:29 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-07-18 16:59:29 +0100
commit147fc419734b057b9d9154c2ca0d9d397054104b (patch)
tree8f2c28dfbbf07df5269fbc9747f4772cfba62dc7 /tests
parent50a2c45da92383138e0d3f22952f3813814e18b3 (diff)
parent748bfb4eee8e699f3d2dd6a95820d1a9e57e4aa6 (diff)
downloadqemu-147fc419734b057b9d9154c2ca0d9d397054104b.tar.gz
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-07-18' into staging
trivial patches for 2014-07-18 # gpg: Signature made Fri 18 Jul 2014 15:04:43 BST using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514 66A7 BEE5 9D74 A4C3 D7DB * remotes/mjt/tags/trivial-patches-2014-07-18: tests: Add missing 'static' attributes (fix warnings from smatch) migration: Add missing 'static' attribute qga: Add missing 'static' attribute hw/usb: Add missing 'static' attribute doc: slirp supports ICMP echo if enabled in Linux qemu-img: Remove redundancy "ret = -1" Fix new typos in comments (found by codespell) slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/fdc-test.c2
-rw-r--r--tests/test-aio.c2
-rw-r--r--tests/test-qemu-opts.c2
-rw-r--r--tests/test-throttle.c8
-rw-r--r--tests/test-visitor-serialization.c6
-rw-r--r--tests/test-vmstate.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/tests/fdc-test.c b/tests/fdc-test.c
index c8e1e7bd18..203074cdad 100644
--- a/tests/fdc-test.c
+++ b/tests/fdc-test.c
@@ -65,7 +65,7 @@ enum {
DSKCHG = 0x80,
};
-char test_image[] = "/tmp/qtest.XXXXXX";
+static char test_image[] = "/tmp/qtest.XXXXXX";
#define assert_bit_set(data, mask) g_assert_cmphex((data) & (mask), ==, (mask))
#define assert_bit_clear(data, mask) g_assert_cmphex((data) & (mask), ==, 0)
diff --git a/tests/test-aio.c b/tests/test-aio.c
index 4c40a4971f..f12b6e0ae8 100644
--- a/tests/test-aio.c
+++ b/tests/test-aio.c
@@ -15,7 +15,7 @@
#include "qemu/timer.h"
#include "qemu/sockets.h"
-AioContext *ctx;
+static AioContext *ctx;
typedef struct {
EventNotifier e;
diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c
index 3653507f56..ca08ac523d 100644
--- a/tests/test-qemu-opts.c
+++ b/tests/test-qemu-opts.c
@@ -56,7 +56,7 @@ static QemuOptsList opts_list_02 = {
},
};
-QemuOptsList opts_list_03 = {
+static QemuOptsList opts_list_03 = {
.name = "opts_list_03",
.head = QTAILQ_HEAD_INITIALIZER(opts_list_03.head),
.desc = {
diff --git a/tests/test-throttle.c b/tests/test-throttle.c
index 3de6ab80e0..000ae31af9 100644
--- a/tests/test-throttle.c
+++ b/tests/test-throttle.c
@@ -15,10 +15,10 @@
#include "block/aio.h"
#include "qemu/throttle.h"
-AioContext *ctx;
-LeakyBucket bkt;
-ThrottleConfig cfg;
-ThrottleState ts;
+static AioContext *ctx;
+static LeakyBucket bkt;
+static ThrottleConfig cfg;
+static ThrottleState ts;
/* useful function */
static bool double_cmp(double x, double y)
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index 74d6481992..7ad1886397 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -372,8 +372,8 @@ static void test_primitive_lists(gconstpointer opaque)
TestArgs *args = (TestArgs *) opaque;
const SerializeOps *ops = args->ops;
PrimitiveType *pt = args->test_data;
- PrimitiveList pl = { .value = { 0 } };
- PrimitiveList pl_copy = { .value = { 0 } };
+ PrimitiveList pl = { .value = { NULL } };
+ PrimitiveList pl_copy = { .value = { NULL } };
PrimitiveList *pl_copy_ptr = &pl_copy;
Error *err = NULL;
void *serialize_data;
@@ -771,7 +771,7 @@ static void test_nested_struct_list(gconstpointer opaque)
g_free(args);
}
-PrimitiveType pt_values[] = {
+static PrimitiveType pt_values[] = {
/* string tests */
{
.description = "string_empty",
diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index a462335c4b..d72c64c90b 100644
--- a/tests/test-vmstate.c
+++ b/tests/test-vmstate.c
@@ -29,8 +29,8 @@
#include "migration/vmstate.h"
#include "block/coroutine.h"
-char temp_file[] = "/tmp/vmst.test.XXXXXX";
-int temp_fd;
+static char temp_file[] = "/tmp/vmst.test.XXXXXX";
+static int temp_fd;
/* Fake yield_until_fd_readable() implementation so we don't have to pull the
* coroutine code as dependency.