Received: from eggs.gnu.org ([2001:4830:134:3::10]:38392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUN1H-0000OK-AD for qemu-devel@nongnu.org; Sat, 07 Mar 2015 17:16:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUN1E-0002Kr-0Q for qemu-devel@nongnu.org; Sat, 07 Mar 2015 17:16:27 -0500 From: Stefan Weil Date: Sat, 7 Mar 2015 23:16:21 +0100 Message-Id: <1425766581-18250-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] block/qapi: Fix Sparse warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Trivial Cc: Kevin Wolf , Stefan Weil , QEMU Developer , Stefan Hajnoczi 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 --- block/qapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qapi.c b/block/qapi.c index 1808e67..8a19aed 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; -- 2.1.4