qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] block/vvfat: Fix compiler warnings for OpenBSD
Date: Thu, 12 Dec 2013 09:22:57 +0100	[thread overview]
Message-ID: <20131212082257.GE13302@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1386794231-18119-1-git-send-email-sw@weilnetz.de>

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 <sw@weilnetz.de>
> ---
>  block/vvfat.c |   43 ++++++++++++++++++++++---------------------
>  1 file changed, 22 insertions(+), 21 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

  reply	other threads:[~2013-12-12  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 20:37 [Qemu-devel] [PATCH] block/vvfat: Fix compiler warnings for OpenBSD Stefan Weil
2013-12-12  8:22 ` Stefan Hajnoczi [this message]
2013-12-12  9:20   ` Kevin Wolf
2013-12-17  3:12 ` Brad Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131212082257.GE13302@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).