qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: andrzej zaborowski <balrogg@gmail.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [RFC, PATCH 2/2] bt-sdp: Fix if statement with empty body, spotted by clang
Date: Thu, 22 Apr 2010 03:58:07 +0200	[thread overview]
Message-ID: <z2nfb249edb1004211858w47052450tb253fda15e94b0a1@mail.gmail.com> (raw)
In-Reply-To: <p2wf43fc5581004180152nee126c14kef1be12038ab2cb0@mail.gmail.com>

On 18 April 2010 10:52, Blue Swirl <blauwirbel@gmail.com> wrote:
> Fix clang error:
>  CC    bt-sdp.o
> /src/qemu/hw/bt-sdp.c:174:17: error: if statement has empty body [-Wempty-body]
>    if (len > 1);
>
> However, fixing this means that some code that was previously
> ignored by the compiler now gets compiled, resulting in this error:
>  CC    bt-sdp.o
> cc1: warnings being treated as errors
> /src/qemu/hw/bt-sdp.c: In function 'sdp_svc_search':
> /src/qemu/hw/bt-sdp.c:184: error: 'max' may be used uninitialized in
> this function
>
> I could not figure out how to calculate max, so I just invented some
> figure to suppress the error.

Thanks, good catches, I applied fixes to both problems.

Turns out we were assigning the value of the "Max" parameter of the
request to the wrong variable, which was later overwritten anyway.  I
don't know what I was thinking...

Cheers

      reply	other threads:[~2010-04-22  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-18  8:52 [Qemu-devel] [RFC, PATCH 2/2] bt-sdp: Fix if statement with empty body, spotted by clang Blue Swirl
2010-04-22  1:58 ` andrzej zaborowski [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=z2nfb249edb1004211858w47052450tb253fda15e94b0a1@mail.gmail.com \
    --to=balrogg@gmail.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).