qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block/vvfat: Fix compiler warnings for OpenBSD


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] block/vvfat: Fix compiler warnings for OpenBSD
Date: Thu, 12 Dec 2013 09:22:57 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Dec 11, 2013 at 09:37:11PM +0100, Stefan Weil wrote:
> The buildbot shows these compiler warnings:
> 
> block/vvfat.c: In function 'create_short_and_long_name':
> block/vvfat.c:620: warning: array size (8) smaller than bound length (11)
> block/vvfat.c:620: warning: array size (8) smaller than bound length (11)
> block/vvfat.c:635: warning: array size (8) smaller than bound length (11)
> block/vvfat.c:635: warning: array size (8) smaller than bound length (11)
> 
> They are caused by tricky code where 8 characters for the name are followed
> by 3 characters for the extension, and some operations touch both name and
> extension.
> 
> Using an 11 character name which includes the extension fixes the compiler
> warning, satisfies cppcheck, valgrind and maybe other static and dynamic
> code checkers, and even simplifies some parts of the code.
> 
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>  block/vvfat.c |   43 ++++++++++++++++++++++---------------------
>  1 file changed, 22 insertions(+), 21 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]