diff options
| author | Stefan Weil | 2015-03-07 23:16:21 +0100 |
|---|---|---|
| committer | Michael Tokarev | 2015-03-19 09:11:55 +0100 |
| commit | 2c20fa2cc26fd203a1260bb5251a523320faa905 (patch) | |
| tree | 85b642ee863372fca8993c41e78bab24219bbc6d /block/qapi.c | |
| parent | Fix remaining warnings from Sparse (void return) (diff) | |
| download | qemu-2c20fa2cc26fd203a1260bb5251a523320faa905.tar.gz qemu-2c20fa2cc26fd203a1260bb5251a523320faa905.tar.xz qemu-2c20fa2cc26fd203a1260bb5251a523320faa905.zip | |
block/qapi: Fix Sparse warning
Sparse reports this warning:
block/qapi.c:417:47: warning:
too long initializer-string for array of char(no space for nul char)
Replacing the string by an array of characters fixes this warning.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'block/qapi.c')
| -rw-r--r-- | block/qapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qapi.c b/block/qapi.c index 1808e67336..8a19aed446 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -414,7 +414,7 @@ BlockStatsList *qmp_query_blockstats(bool has_query_nodes, static char *get_human_readable_size(char *buf, int buf_size, int64_t size) { - static const char suffixes[NB_SUFFIXES] = "KMGT"; + static const char suffixes[NB_SUFFIXES] = {'K', 'M', 'G', 'T'}; int64_t base; int i; |
