Revision ea7697fc tests/libqtest.c
b/tests/libqtest.c | ||
---|---|---|
26 | 26 |
#include <unistd.h> |
27 | 27 |
#include <string.h> |
28 | 28 |
|
29 |
#include "compiler.h" |
|
29 | 30 |
#include "osdep.h" |
30 | 31 |
|
31 | 32 |
#define MAX_IRQ 256 |
... | ... | |
130 | 131 |
} |
131 | 132 |
} |
132 | 133 |
|
133 |
static void qtest_sendf(QTestState *s, const char *fmt, ...) |
|
134 |
static void GCC_FMT_ATTR(2, 3) qtest_sendf(QTestState *s, const char *fmt, ...)
|
|
134 | 135 |
{ |
135 | 136 |
va_list ap; |
136 | 137 |
gchar *str; |
... | ... | |
356 | 357 |
gchar **args; |
357 | 358 |
size_t i; |
358 | 359 |
|
359 |
qtest_sendf(s, "read 0x%" PRIx64 " 0x%x\n", addr, size); |
|
360 |
qtest_sendf(s, "read 0x%" PRIx64 " 0x%zx\n", addr, size);
|
|
360 | 361 |
args = qtest_rsp(s, 2); |
361 | 362 |
|
362 | 363 |
for (i = 0; i < size; i++) { |
... | ... | |
378 | 379 |
const uint8_t *ptr = data; |
379 | 380 |
size_t i; |
380 | 381 |
|
381 |
qtest_sendf(s, "write 0x%" PRIx64 " 0x%x 0x", addr, size); |
|
382 |
qtest_sendf(s, "write 0x%" PRIx64 " 0x%zx 0x", addr, size);
|
|
382 | 383 |
for (i = 0; i < size; i++) { |
383 | 384 |
qtest_sendf(s, "%02x", ptr[i]); |
384 | 385 |
} |
Also available in: Unified diff