qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] vnc: Fix packed boolean struct members
Date: Thu, 15 Mar 2012 08:28:20 +0000	[thread overview]
Message-ID: <20120315082820.GD14640@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <1331243886-19117-1-git-send-email-sw@weilnetz.de>

On Thu, Mar 08, 2012 at 10:58:06PM +0100, Stefan Weil wrote:
> This patch fixes warnings reported by splint:
> 
> For variables which are packed in a single bit, a signed data type
> like 'int' does not make much sense.
> 
> There is no obvious reason why the two values should be packed,
> so I removed the packing and changed the data type to bool
> because both are used as boolean values.
> 
> v2:
> 
> Some versions of gcc complain after this modification,
> for example gcc (Debian 4.4.5-8) 4.4.5):
> 
> ui/vnc-auth-sasl.c: In function ‘vnc_sasl_client_cleanup’:
> ui/vnc-auth-sasl.c:34: error: suggest parentheses around assignment used as truth value
> 
> Obviously, the compiler does not like code which does
> bool = unsigned = bool = 0
> 
> Splitting that code in three statements works.
> 
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  ui/vnc-auth-sasl.c |    4 +++-
>  ui/vnc-auth-sasl.h |    4 ++--
>  2 files changed, 5 insertions(+), 3 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan

      reply	other threads:[~2012-03-15  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 21:58 [Qemu-devel] [PATCH v2] vnc: Fix packed boolean struct members Stefan Weil
2012-03-15  8:28 ` Stefan Hajnoczi [this message]

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=20120315082820.GD14640@stefanha-thinkpad.localdomain \
    --to=stefanha@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).