lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D3E888D.60909@suse.cz>
Date:	Tue, 25 Jan 2011 09:23:41 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	Andreas Mohr <andi@...as.de>
CC:	Takashi Iwai <tiwai@...e.de>, jirislaby@...il.com, perex@...ex.cz,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
	Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH] azt3328: repair breakage (Re: [PATCH 1/1] SOUND: azt3328,
 fix broken AZF_FMT_XLATE macro)

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ