All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Andreas Mohr <andi@lisas.de>
Cc: Takashi Iwai <tiwai@suse.de>,
	jirislaby@gmail.com, perex@perex.cz, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Subject: Re: [PATCH] azt3328: repair breakage (Re: [PATCH 1/1] SOUND: azt3328, fix broken AZF_FMT_XLATE macro)
Date: Tue, 25 Jan 2011 09:23:41 +0100	[thread overview]
Message-ID: <4D3E888D.60909@suse.cz> (raw)
In-Reply-To: <20110125054631.GA10984@rhlx01.hs-esslingen.de>

On 01/25/2011 06:46 AM, Andreas Mohr wrote:
> It is also quite interesting to note that this rather uncommon language syntax
> (do...while(0) within switch scope) compiled cleanly without issue
> (no warnings).

Note that the switch block is the same like the others and case and
default and very similar to goto labels. You can even do:
switch (x) {
int abc;
{ case 5: abc = 7; break; }
do { case 3: abc = 5; break; } while (0);
while (1) {
        printf("%d\n", abc);
default:
        abc = 1;
}
}
And check what it will do for x == 3, 5, and others :).

regards,
-- 
js
suse labs

  parent reply	other threads:[~2011-01-25  8:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22 13:56 [PATCH 1/1] SOUND: azt3328, fix broken AZF_FMT_XLATE macro Jiri Slaby
2011-01-22 16:26 ` Takashi Iwai
2011-01-22 16:26   ` Takashi Iwai
2011-01-25  5:46   ` [PATCH] azt3328: repair breakage (Re: [PATCH 1/1] SOUND: azt3328, fix broken AZF_FMT_XLATE macro) Andreas Mohr
2011-01-25  5:46     ` Andreas Mohr
2011-01-25  7:13     ` Takashi Iwai
2011-01-25  7:13       ` Takashi Iwai
2011-01-25  8:23     ` Jiri Slaby [this message]
2011-01-25  9:40       ` Takashi Iwai
2011-01-25  9:40         ` Takashi Iwai
2011-01-22 20:01 ` [PATCH 1/1] SOUND: azt3328, fix broken AZF_FMT_XLATE macro Andreas Mohr
2011-01-22 20:01   ` Andreas Mohr

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=4D3E888D.60909@suse.cz \
    --to=jslaby@suse.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=andi@lisas.de \
    --cc=apw@canonical.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.