Re: [CODE] Unreachable Code

From: Chuck Carson (chuck@EDEN.COM)
Date: 06/11/98


Mundi King wrote:
>
> Warn :  act.other.c(720,7):Unreachable code
>
>         send_to_char("Usage: prompt { { H | M | V } | all | none }\r\n", ch);
>                 return;
>                         break;
>
> Warn :  db.c(709,12):Unreachable code
>
>       top_of_world = room_nr++;
>             return;
>                   break;
>
> Warn :  db.c(1199,12):Unreachable code
>
>     case '#':
>           top_of_objt = i++;
>                 return line;
>                       break;
>
> Warn :  interpreter.c(1517,12):Unreachable code
>
>                 "What IS your sex? ", d);
>                       return;
>                             break;
>
> Warn :  interpreter.c(1653,10):Unreachable code
>
>     } else {
>           SEND_TO_Q("\r\nEnter a new password: ", d);
>                 STATE(d) = CON_CHPWD_GETNEW;
>                       return;
>                           }
>                               break;
>
> Warn :  house.c(594,10):Unreachable code
>
>         return 1;
>             return 0;
>                 break;
>
> Warn :  magic.c(856,10):Unreachable code
>
>     log("SYSERR: unknown spellnum %d passed to mag_unaffects.",
> spellnum);
>         return;
>             break;
>
> Warn :  magic.c(960,10):Unreachable code
>
>     send_to_char("Spell unimplemented, it would seem.\r\n", ch);
>         return;
>             break;
>
> Warn :  olc.c(96,10):Unreachable code
>
>     olc_set_show(ch, olc_mode, argument);
>         return;
>             break;
>
> Warn :  olc.c(158,10):Unreachable code
>
>     send_to_char("Usage: olc {.|set|show|obj|mob|room} [args]\r\n", ch);
>         return;
>             break;
>
> Warn :  olc.c(205,10):Unreachable code
>
>     log("SYSERR: Invalid OLC mode %d passed to interp.", mode);
>         return;
>             break;
>
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>      +------------------------------------------------------------+
Do not know if you are seeking help or not, but the break statements
are useless and unnecessary. Also, just curoius, what compiler produced
this?

CHuck


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST