Merge branch 'public_next' into master

This commit is contained in:
Alam Ed Arias 2017-09-28 11:01:20 -04:00
commit f1a347e55f
25 changed files with 113 additions and 23 deletions

View File

@ -100,6 +100,21 @@ matrix:
compiler: gcc-6
env: WFLAGS="-Wno-tautological-compare"
#gcc-6 (Ubuntu 6.1.1-3ubuntu11~14.04.1) 6.1.1 20160511
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-7
compiler: gcc-7
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough"
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
- os: linux
compiler: clang
#clang version 3.5.0 (tags/RELEASE_350/final)

View File

@ -7,6 +7,17 @@
# and other things
#
ifdef GCC72
GCC71=1
endif
ifdef GCC71
GCC64=1
endif
ifdef GCC64
GCC64=1
endif
ifdef GCC63
GCC62=1

View File

@ -412,7 +412,7 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) {
case OP_FORLOOP:
case OP_FORPREP:
checkreg(pt, a+3);
/* go through */
/* FALLTHRU */
case OP_JMP: {
int dest = pc+1+b;
/* not full check and jump is forward and do not skip `lastpc'? */

View File

@ -306,11 +306,12 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) {
save_and_next(ls); /* skip $ */
seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + 1,
luaZ_bufflen(ls->buff) - 2);
ls->refstr++; /* expect '\' anytime soon */
ls->refstr++; /* expect '\' anytime soon */
lua_assert(ls->lookahead.token == TK_EOS);
ls->lookahead.token = TK_CONCAT;
return;
}
ls->lookahead.token = TK_CONCAT;
return;
}
/* FALLTHRU */
default: {
if (!isdigit(ls->current))
save_and_next(ls); /* handles \\, \", \', and \? */
@ -340,7 +341,8 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) {
};
switch (i) {
case 4: save( ls, (c>>8) & 0xff ); // pass-through..
case 4: save( ls, (c>>8) & 0xff );
/* FALLTHRU */
case 2: save( ls, c&0xff );
break;
case 5:
@ -350,7 +352,7 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) {
}
continue;
// "\u0000".."\x10FFFF": UTF-8 encoded Unicode
// "\u0000".."\x10FFFF": UTF-8 encoded Unicode
//
// Note that although codes are entered like this (must have min. four digit,
// just to tease you!) the actual outcome in the string will vary between
@ -482,20 +484,22 @@ static int llex (LexState *ls, SemInfo *seminfo) {
else if (sep == -1) return '[';
else luaX_lexerror(ls, "invalid long string delimiter", TK_STRING);
}
/* FALLTHRU */
case '=': {
next(ls);
if (ls->current != '=') return '=';
else { next(ls); return TK_EQ; }
}
/* FALLTHRU */
case '<': {
next(ls);
if (ls->current == '<') { next(ls); return TK_SHL; }
if (ls->current == '<') { next(ls); return TK_SHL; }
if (ls->current != '=') return '<';
else { next(ls); return TK_LE; }
}
case '>': {
next(ls);
if (ls->current == '>') { next(ls); return TK_SHR; }
if (ls->current == '>') { next(ls); return TK_SHR; }
if (ls->current != '=') return '>';
else { next(ls); return TK_GE; }
}
@ -547,9 +551,10 @@ static int llex (LexState *ls, SemInfo *seminfo) {
}
case '\\': if (ls->refstr) {
ls->refstr--;
ls->current = '"'; /* whacky! */
return TK_CONCAT;
ls->current = '"'; /* whacky! */
return TK_CONCAT;
}
/* FALLTHRU */
default: {
if (isspace(ls->current)) {
lua_assert(!currIsNewline(ls));

View File

@ -478,6 +478,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
return luaH_getnum(t, k); /* use specialized version */
/* else go through */
}
/* FALLTHRU */
default: {
Node *n = mainposition(t, key);
do { /* check whether `key' is somewhere in the chain */

View File

@ -1189,7 +1189,10 @@ finish:
CONS_Printf(M_GetText("%s set to %s\n"), var->name, var->string);
var->flags &= ~CV_SHOWMODIFONETIME;
}
DEBFILE(va("%s set to %s\n", var->name, var->string));
else // display message in debug file only
{
DEBFILE(va("%s set to %s\n", var->name, var->string));
}
var->flags |= CV_MODIFIED;
// raise 'on change' code
#ifdef HAVE_BLUA

View File

@ -1903,6 +1903,7 @@ static boolean CL_ServerConnectionTicker(boolean viams, const char *tmpsave, tic
break; // exit the case
cl_mode = CL_ASKJOIN; // don't break case continue to cljoin request now
/* FALLTHRU */
case CL_ASKJOIN:
CL_LoadServerFiles();
@ -3635,6 +3636,7 @@ static void HandlePacketFromAwayNode(SINT8 node)
// Do not remove my own server (we have just get a out of order packet)
if (node == servernode)
break;
/* FALLTHRU */
default:
DEBFILE(va("unknown packet received (%d) from unknown host\n",netbuffer->packettype));
@ -3791,6 +3793,7 @@ FILESTAMP
break;
case PT_TEXTCMD2: // splitscreen special
netconsole = nodetoplayer2[node];
/* FALLTHRU */
case PT_TEXTCMD:
if (client)
break;
@ -4145,7 +4148,10 @@ static INT16 Consistancy(void)
#ifdef MOBJCONSISTANCY
if (!thinkercap.next)
{
DEBFILE(va("Consistancy = %u\n", ret));
return ret;
}
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
@ -4214,6 +4220,8 @@ static INT16 Consistancy(void)
}
#endif
DEBFILE(va("Consistancy = %u\n", (ret & 0xFFFF)));
return (INT16)(ret & 0xFFFF);
}

View File

@ -1030,6 +1030,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
#endif
return false;
}
netbuffer->ack = netbuffer->ackreturn = 0; // don't hold over values from last packet sent/received
M_Memcpy(&reboundstore[rebound_head], netbuffer,
doomcom->datalength);
reboundsize[rebound_head] = doomcom->datalength;
@ -1365,7 +1366,7 @@ boolean D_CheckNetGame(void)
#else
if (M_CheckParm("-debugfile"))
{
char filename[20];
char filename[21];
INT32 k = doomcom->consoleplayer - 1;
if (M_IsNextParm())
k = atoi(M_GetNextParm()) - 1;

View File

@ -2532,7 +2532,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
error = true;
break;
}
//fall down
/* FALLTHRU */
case GT_TAG:
switch (NetPacket.packet.newteam)
{

View File

@ -11,6 +11,7 @@
/// \brief Load dehacked file and change tables and text
#include "doomdef.h"
#include "d_main.h" // for srb2home
#include "g_game.h"
#include "sounds.h"
#include "info.h"
@ -2800,6 +2801,8 @@ static void readmaincfg(MYFILE *f)
strncpy(savegamename, timeattackfolder, sizeof (timeattackfolder));
strlcat(savegamename, "%u.ssg", sizeof(savegamename));
// can't use sprintf since there is %u in savegamename
strcatbf(savegamename, srb2home, PATHSEP);
gamedataadded = true;
titlechanged = true;

View File

@ -94,7 +94,7 @@ static fixed_t paldiv = 0;
* \return fademask_t for lump
*/
static fademask_t *F_GetFadeMask(UINT8 masknum, UINT8 scrnnum) {
static char lumpname[9] = "FADEmmss";
static char lumpname[10] = "FADEmmss";
static fademask_t fm = {NULL,0,0,0,0,0};
lumpnum_t lumpnum;
UINT8 *lump, *mask;

View File

@ -747,7 +747,7 @@ void G_SetGameModified(boolean silent)
*/
const char *G_BuildMapName(INT32 map)
{
static char mapname[9] = "MAPXX"; // internal map name (wad resource name)
static char mapname[10] = "MAPXX"; // internal map name (wad resource name)
I_Assert(map > 0);
I_Assert(map <= NUMMAPS);

View File

@ -3253,6 +3253,7 @@ static void M_DrawGenericMenu(void)
W_CachePatchName(currentMenu->menuitems[i].patch, PU_CACHE));
}
}
/* FALLTHRU */
case IT_NOTHING:
case IT_DYBIGSPACE:
y += LINEHEIGHT;
@ -3311,6 +3312,7 @@ static void M_DrawGenericMenu(void)
break;
case IT_STRING2:
V_DrawString(x, y, 0, currentMenu->menuitems[i].text);
/* FALLTHRU */
case IT_DYLITLSPACE:
y += SMALLLINEHEIGHT;
break;
@ -3323,6 +3325,7 @@ static void M_DrawGenericMenu(void)
case IT_TRANSTEXT:
if (currentMenu->menuitems[i].alphaKey)
y = currentMenu->y+currentMenu->menuitems[i].alphaKey;
/* FALLTHRU */
case IT_TRANSTEXT2:
V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);
y += SMALLLINEHEIGHT;
@ -3672,6 +3675,7 @@ static void M_DrawCenteredMenu(void)
W_CachePatchName(currentMenu->menuitems[i].patch, PU_CACHE));
}
}
/* FALLTHRU */
case IT_NOTHING:
case IT_DYBIGSPACE:
y += LINEHEIGHT;
@ -3729,6 +3733,7 @@ static void M_DrawCenteredMenu(void)
break;
case IT_STRING2:
V_DrawCenteredString(x, y, 0, currentMenu->menuitems[i].text);
/* FALLTHRU */
case IT_DYLITLSPACE:
y += SMALLLINEHEIGHT;
break;

View File

@ -1086,7 +1086,7 @@ void M_StartMovie(void)
moviemode = M_StartMovieGIF(pathname);
break;
}
// fall thru
/* FALLTHRU */
case MM_APNG:
moviemode = M_StartMovieAPNG(pathname);
break;

View File

@ -79,7 +79,7 @@ void T_MoveCeiling(ceiling_t *ceiling)
P_LinedefExecute((INT16)(ceiling->texture + INT16_MAX + 2), NULL, NULL);
if (ceiling->texture > -1) // flat changing
ceiling->sector->ceilingpic = ceiling->texture;
// don't break
/* FALLTHRU */
case raiseToHighest:
// case raiseCeilingByLine:
case moveCeilingByFrontTexture:
@ -182,6 +182,7 @@ void T_MoveCeiling(ceiling_t *ceiling)
// except generalized ones, reset speed, start back up
case crushAndRaise:
ceiling->speed = CEILSPEED;
/* FALLTHRU */
case fastCrushAndRaise:
ceiling->direction = 1;
break;
@ -200,6 +201,7 @@ void T_MoveCeiling(ceiling_t *ceiling)
if (ceiling->texture > -1) // flat changing
ceiling->sector->ceilingpic = ceiling->texture;
// don't break
/* FALLTHRU */
// in all other cases, just remove the active ceiling
case lowerAndCrush:
@ -427,6 +429,7 @@ INT32 EV_DoCeiling(line_t *line, ceiling_e type)
case crushAndRaise:
ceiling->crush = true;
ceiling->topheight = sec->ceilingheight;
/* FALLTHRU */
case lowerAndCrush:
ceiling->bottomheight = sec->floorheight;
ceiling->bottomheight += 4*FRACUNIT;

View File

@ -6065,7 +6065,7 @@ void A_Boss7Chase(mobj_t *actor)
break;
}
actor->threshold++;
// fall into...
/* FALLTHRU */
case 1: // Chaingun Goop
A_FaceTarget(actor);
P_SetMobjState(actor, S_BLACKEGG_SHOOT1);

View File

@ -316,6 +316,7 @@ void T_MoveFloor(floormove_t *movefloor)
case moveFloorByFrontSector:
if (movefloor->texture < -1) // chained linedef executing
P_LinedefExecute((INT16)(movefloor->texture + INT16_MAX + 2), NULL, NULL);
/* FALLTHRU */
case instantMoveFloorByFrontSector:
if (movefloor->texture > -1) // flat changing
movefloor->sector->floorpic = movefloor->texture;
@ -364,6 +365,7 @@ void T_MoveFloor(floormove_t *movefloor)
case moveFloorByFrontSector:
if (movefloor->texture < -1) // chained linedef executing
P_LinedefExecute((INT16)(movefloor->texture + INT16_MAX + 2), NULL, NULL);
/* FALLTHRU */
case instantMoveFloorByFrontSector:
if (movefloor->texture > -1) // flat changing
movefloor->sector->floorpic = movefloor->texture;

View File

@ -483,9 +483,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
case MT_REDTEAMRING:
if (player->ctfteam != 1)
return;
/* FALLTHRU */
case MT_BLUETEAMRING: // Yes, I'm lazy. Oh well, deal with it.
if (special->type == MT_BLUETEAMRING && player->ctfteam != 2)
return;
/* FALLTHRU */
case MT_RING:
case MT_FLINGRING:
if (!(P_CanPickupItem(player, false)))
@ -3390,7 +3392,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
P_SetMobjState(target, target->info->meleestate); // go to pinch pain state
break;
}
// fallthrough
/* FALLTHRU */
default:
P_SetMobjState(target, target->info->painstate);
break;

View File

@ -7752,7 +7752,6 @@ void P_MobjThinker(mobj_t *mobj)
else
mobj->z = mobj->floorz;
}
// THERE IS NO BREAK HERE ON PURPOSE
default:
// check mobj against possible water content, before movement code
P_MobjCheckWater(mobj);
@ -8789,6 +8788,7 @@ void P_PrecipitationEffects(void)
{
case PRECIP_RAIN: // no lightning or thunder whatsoever
sounds_thunder = false;
/* FALLTHRU */
case PRECIP_STORM_NOSTRIKES: // no lightning strikes specifically
effects_lightning = false;
break;

View File

@ -1670,12 +1670,18 @@ static inline void SaveWhatThinker(const thinker_t *th, const UINT8 type)
static void P_NetArchiveThinkers(void)
{
const thinker_t *th;
UINT32 numsaved = 0;
WRITEUINT32(save_p, ARCHIVEBLOCK_THINKERS);
// save off the current thinkers
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (!(th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed
|| th->function.acp1 == (actionf_p1)P_RainThinker
|| th->function.acp1 == (actionf_p1)P_SnowThinker))
numsaved++;
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
{
SaveMobjThinker(th, tc_mobj);
@ -1869,6 +1875,8 @@ static void P_NetArchiveThinkers(void)
#endif
}
CONS_Debug(DBG_NETPLAY, "%u thinkers saved\n", numsaved);
WRITEUINT8(save_p, tc_end);
}
@ -2656,6 +2664,7 @@ static void P_NetUnArchiveThinkers(void)
UINT8 tclass;
UINT8 restoreNum = false;
UINT32 i;
UINT32 numloaded = 0;
if (READUINT32(save_p) != ARCHIVEBLOCK_THINKERS)
I_Error("Bad $$$.sav at archive block Thinkers");
@ -2689,6 +2698,7 @@ static void P_NetUnArchiveThinkers(void)
if (tclass == tc_end)
break; // leave the saved thinker reading loop
numloaded++;
switch (tclass)
{
@ -2844,6 +2854,8 @@ static void P_NetUnArchiveThinkers(void)
}
}
CONS_Debug(DBG_NETPLAY, "%u thinkers loaded\n", numloaded);
if (restoreNum)
{
executor_t *delay = NULL;

View File

@ -3608,6 +3608,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
goto DoneSection2;
}
}
/* FALLTHRU */
case 4: // Linedef executor that doesn't require touching floor
case 5: // Linedef executor
case 6: // Linedef executor (7 Emeralds)
@ -4650,6 +4651,8 @@ static void P_RunSpecialSectorCheck(player_t *player, sector_t *sector)
// requires touching floor.
break;
}
/* FALLTHRU */
case 1: // Starpost activator
case 5: // Fan sector
case 6: // Super Sonic Transform
@ -5806,6 +5809,8 @@ void P_SpawnSpecials(INT32 fromnetsave)
EV_DoFloor(&lines[i], bounceFloor);
if (lines[i].special == 54)
break;
/* FALLTHRU */
case 55: // New super cool and awesome moving ceiling type
if (lines[i].backsector)
EV_DoCeiling(&lines[i], bounceCeiling);
@ -5817,7 +5822,8 @@ void P_SpawnSpecials(INT32 fromnetsave)
EV_DoFloor(&lines[i], bounceFloorCrush);
if (lines[i].special == 57)
break; //only move the floor
break; //only move the floor
/* FALLTHRU */
case 58: // New super cool and awesome moving ceiling crush type
if (lines[i].backsector)
@ -6905,6 +6911,7 @@ static void P_SpawnScrollers(void)
Add_Scroller(sc_ceiling, -dx, dy, control, s, accel, l->flags & ML_NOCLIMB);
if (special != 533)
break;
/* FALLTHRU */
case 523: // carry objects on ceiling
dx = FixedMul(dx, CARRYFACTOR);
@ -6919,6 +6926,7 @@ static void P_SpawnScrollers(void)
Add_Scroller(sc_floor, -dx, dy, control, s, accel, l->flags & ML_NOCLIMB);
if (special != 530)
break;
/* FALLTHRU */
case 520: // carry objects on floor
dx = FixedMul(dx, CARRYFACTOR);

View File

@ -941,6 +941,7 @@ static inline boolean I_SkipFrame(void)
case GS_LEVEL:
if (!paused)
return false;
/* FALLTHRU */
//case GS_TIMEATTACK: -- sorry optimisation but now we have a cool level platter and that being laggardly looks terrible
case GS_WAITINGPLAYERS:
return skip; // Skip odd frames

View File

@ -486,7 +486,7 @@ void S_InitRuntimeSounds (void)
{
sfxenum_t i;
INT32 value;
char soundname[7];
char soundname[10];
for (i = sfx_freeslot0; i <= sfx_lastskinsoundslot; i++)
{

View File

@ -1308,6 +1308,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
{
case V_MONOSPACE:
spacewidth = 8;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 8;
break;
@ -1389,6 +1390,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
{
case V_MONOSPACE:
spacewidth = 8;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 8;
break;
@ -1502,6 +1504,7 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
{
case V_MONOSPACE:
spacewidth = 4;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 4;
break;
@ -1607,6 +1610,7 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
{
case V_MONOSPACE:
spacewidth = 5;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 5;
break;
@ -1704,6 +1708,7 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
{
case V_MONOSPACE:
spacewidth = 8;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 8;
break;
@ -1988,6 +1993,7 @@ INT32 V_StringWidth(const char *string, INT32 option)
{
case V_MONOSPACE:
spacewidth = 8;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 8;
break;
@ -2029,6 +2035,7 @@ INT32 V_SmallStringWidth(const char *string, INT32 option)
{
case V_MONOSPACE:
spacewidth = 4;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 4;
break;
@ -2067,6 +2074,7 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
{
case V_MONOSPACE:
spacewidth = 5;
/* FALLTHRU */
case V_OLDSPACING:
charwidth = 5;
break;

View File

@ -1047,6 +1047,7 @@ void Y_StartIntermission(void)
// fall back into the coop intermission for now
intertype = int_coop;
/* FALLTHRU */
case int_coop: // coop or single player, normal level
{
// award time and ring bonuses
@ -1163,6 +1164,7 @@ void Y_StartIntermission(void)
// fall back into the special stage intermission for now
intertype = int_spec;
/* FALLTHRU */
case int_spec: // coop or single player, special stage
{
// Update visitation flags?