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 <s...@weilnetz.de>
> > ---
> >  block/vvfat.c |   43 ++++++++++++++++++++++---------------------
> >  1 file changed, 22 insertions(+), 21 deletions(-)
> 
> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

Thanks, applied to the block branch.

Kevin

Reply via email to