]> git.proxmox.com Git - mirror_qemu.git/commit
char: cast ARRAY_SIZE() as signed to silent warning on empty array
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 30 May 2017 12:09:19 +0000 (09:09 -0300)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 2 Jun 2017 07:33:35 +0000 (11:33 +0400)
commitc7e47c63e0362ffded57db38684b88c270cff65f
treecae1c29ad31cb06bcf91e5e061d5b977b01560b8
parent43771d5d92312504305c19abe29ec5bfabd55f01
char: cast ARRAY_SIZE() as signed to silent warning on empty array

chardev/char.c: In function 'chardev_name_foreach':
chardev/char.c:546:19: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
     for (i = 0; i < ARRAY_SIZE(chardev_alias_table); i++) {
                   ^
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170530120919.8874-1-f4bug@amsat.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
chardev/char.c