Address a number of harmless instances of "code never reached" identified by Xcode.

git-svn-id: https://svn.eduke32.com/eduke32@5961 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-12-26 06:02:06 +00:00
parent 5c17259a71
commit 2c96410b39
9 changed files with 14 additions and 21 deletions

View file

@ -8007,9 +8007,7 @@ CANCEL:
{ {
bad = 0; bad = 0;
if (!ask_if_sure("Are you sure you want to start a new board? (Y/N)", 0)) if (ask_if_sure("Are you sure you want to start a new board? (Y/N)", 0))
break;
else
{ {
int32_t bakstat=-1; int32_t bakstat=-1;
mapinfofull_t bakmap; mapinfofull_t bakmap;
@ -8051,11 +8049,9 @@ CANCEL:
CheckMapCorruption(4, 0); CheckMapCorruption(4, 0);
break;
} }
// printmessage16(""); break;
showframe(1);
} }
else if (ch == 'l' || ch == 'L') //L else if (ch == 'l' || ch == 'L') //L
{ {

View file

@ -2446,7 +2446,7 @@ static int32_t defsparser(scriptfile *script)
case T_UNDEFMODELOF: case T_UNDEFMODELOF:
{ {
int32_t r0; int32_t r0;
#ifdef USE_OPENGL #if defined USE_OPENGL && 0
int32_t mid; int32_t mid;
#endif #endif
@ -2459,7 +2459,7 @@ static int32_t defsparser(scriptfile *script)
initprintf("Warning: undefmodelof: currently non-functional.\n"); initprintf("Warning: undefmodelof: currently non-functional.\n");
break; break;
#ifdef USE_OPENGL #if defined USE_OPENGL && 0
mid = md_tilehasmodel(r0,0); mid = md_tilehasmodel(r0,0);
if (mid < 0) break; if (mid < 0) break;

View file

@ -974,8 +974,9 @@ static int32_t tile_is_sky(int32_t tilenum)
{ {
return return (tilenum >= 78 /*CLOUDYOCEAN*/ && tilenum <= 99 /*REDSKY2*/); return return (tilenum >= 78 /*CLOUDYOCEAN*/ && tilenum <= 99 /*REDSKY2*/);
} }
# define clamp_if_tile_is_sky(x, y) (tile_is_sky(x) ? (y) : GL_REPEAT)
#else #else
# define tile_is_sky(x) (0) # define clamp_if_tile_is_sky(x, y) (GL_REPEAT)
#endif #endif
static void polymost_setuptexture(const int32_t dameth, int filter) static void polymost_setuptexture(const int32_t dameth, int filter)
@ -1004,7 +1005,7 @@ static void polymost_setuptexture(const int32_t dameth, int filter)
if (!(dameth & DAMETH_CLAMPED)) if (!(dameth & DAMETH_CLAMPED))
{ {
bglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, !tile_is_sky(dapic) ? GL_REPEAT : clamp_mode); bglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_if_tile_is_sky(dapic, clamp_mode));
bglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); bglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
} }
else else

View file

@ -193,12 +193,13 @@ int32_t wm_msgbox(const char *name, const char *fmt, ...)
#elif defined GEKKO #elif defined GEKKO
puts(buf); puts(buf);
return 0; return 0;
#endif #else
puts(buf); puts(buf);
puts(" (press Return or Enter to continue)"); puts(" (press Return or Enter to continue)");
getchar(); getchar();
return 0; return 0;
#endif
} }
#if SDL_MAJOR_VERSION != 1 #if SDL_MAJOR_VERSION != 1

View file

@ -6705,7 +6705,6 @@ skipframe:
} }
while (1); while (1);
G_GameExit(" ");
return 0; // not reached (duh) return 0; // not reached (duh)
} }

View file

@ -1470,7 +1470,7 @@ static int32_t C_SkipComments(void)
g_errorCnt++; g_errorCnt++;
continue; continue;
} }
continue; break;
default: default:
if (ispecial(*textptr)) if (ispecial(*textptr))

View file

@ -2804,7 +2804,6 @@ nullquote:
P_SetGamePalette(pPlayer, tw, 2 + 16); P_SetGamePalette(pPlayer, tw, 2 + 16);
continue; continue;
} }
continue;
case CON_GUNIQHUDID: case CON_GUNIQHUDID:
insptr++; insptr++;

View file

@ -2416,11 +2416,6 @@ badindex:
continue; continue;
} }
insptr++;
X_ERROR_INVALIDQUOTE(*insptr, apStrings);
OSD_Printf("%s", apStrings[*insptr++]);
continue;
case CON_GETNUMBER16: /* deprecated */ case CON_GETNUMBER16: /* deprecated */
case CON_GETNUMBER256: /* deprecated */ case CON_GETNUMBER256: /* deprecated */
case CON_GETNUMBERFROMUSER: case CON_GETNUMBERFROMUSER:

View file

@ -4694,11 +4694,10 @@ static int32_t Menu_RunInput_MouseAdvance(void)
static int32_t Menu_RunInput_MouseReturn_status; static int32_t Menu_RunInput_MouseReturn_status;
#if !defined EDUKE32_TOUCH_DEVICES
static void Menu_Run_MouseReturn(Menu_t *cm, const vec2_t origin) static void Menu_Run_MouseReturn(Menu_t *cm, const vec2_t origin)
{ {
#if !defined EDUKE32_TOUCH_DEVICES
if (!MOUSEACTIVECONDITION) if (!MOUSEACTIVECONDITION)
#endif
return; return;
if (cm->menuID == MENU_MAIN) if (cm->menuID == MENU_MAIN)
@ -4709,6 +4708,7 @@ static void Menu_Run_MouseReturn(Menu_t *cm, const vec2_t origin)
2 | 8 | 16 | RS_ALIGN_L, MOUSEALPHA, 0, xdim_from_320_16(origin.x + x_widescreen_left()), 0, 2 | 8 | 16 | RS_ALIGN_L, MOUSEALPHA, 0, xdim_from_320_16(origin.x + x_widescreen_left()), 0,
xdim_from_320_16(origin.x + x_widescreen_left() + (tilesiz[SELECTDIR].y << 15)), ydim - 1); xdim_from_320_16(origin.x + x_widescreen_left() + (tilesiz[SELECTDIR].y << 15)), ydim - 1);
} }
#endif
static int32_t Menu_RunInput_MouseReturn(void) static int32_t Menu_RunInput_MouseReturn(void)
{ {
@ -5029,7 +5029,9 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
} }
} }
#if !defined EDUKE32_TOUCH_DEVICES
Menu_Run_MouseReturn(cm, origin); Menu_Run_MouseReturn(cm, origin);
#endif
} }
/* /*