Enlightenment CVS committal Author : tsauerbeck Project : e17 Module : libs/embryo
Dir : e17/libs/embryo/src/bin Modified Files: embryo_cc_sc1.c Log Message: fixed switch statements with only one case statement =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- embryo_cc_sc1.c 8 Dec 2004 06:05:23 -0000 1.19 +++ embryo_cc_sc1.c 26 Feb 2005 14:46:07 -0000 1.20 @@ -21,7 +21,7 @@ * must not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. - * Version: $Id: embryo_cc_sc1.c,v 1.19 2004/12/08 06:05:23 raster Exp $ + * Version: $Id: embryo_cc_sc1.c,v 1.20 2005/02/26 14:46:07 tsauerbeck Exp $ */ #include <assert.h> #include <ctype.h> @@ -3859,9 +3859,15 @@ * occur; there really shouldn't be duplicate cases, but the compiler * may not crash or drop into an assertion for a user error). */ for (cse = caselist.next; cse != NULL && cse->next != NULL; cse = cse->next) + ; /* empty. no idea whether this is correct, but we MUST NOT do + * the setlabel(lbl_table) call in the loop body. doing so breaks + * switch statements that only have one case statement following. + */ #endif - /* generate the table here, before lbl_exit (general jump target) */ - setlabel(lbl_table); + + /* generate the table here, before lbl_exit (general jump target) */ + setlabel(lbl_table); + if (swdefault == FALSE) { /* store lbl_exit as the "none-matched" label in the switch table */ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs