[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block/vvfat: Fix compiler warnings for OpenBSD
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] block/vvfat: Fix compiler warnings for OpenBSD |
Date: |
Thu, 12 Dec 2013 10:20:06 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 12.12.2013 um 09:22 hat Stefan Hajnoczi geschrieben:
> 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>
Thanks, applied to the block branch.
Kevin