diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index 444e3cd180..03edbd6dc4 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -2354,6 +2354,8 @@ static bool LoadDehSupp () { sc.MustGetString(); DEHSprName s; + // initialize with zeroes + memset(&s, 0, sizeof(s)); if (strlen(sc.String) ==4) { s.c[0] = sc.String[0]; diff --git a/src/p_sight.cpp b/src/p_sight.cpp index 3b59eb9e50..cc2940d7d7 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -180,10 +180,10 @@ bool SightCheck::PTR_SightTraverse (intercept_t *in) fixed_t ffb_bottom=rover2->bottom.plane->ZatPoint(trX, trY); fixed_t ffb_top=rover2->top.plane->ZatPoint(trX, trY); - if (ffb_bottom >= ff_bottom && ffb_bottom<=ff_top || - ffb_top <= ff_top && ffb_top >= ff_bottom || - ffb_top >= ff_top && ffb_bottom <= ff_bottom || - ffb_top <= ff_top && ffb_bottom >= ff_bottom) + if ( (ffb_bottom >= ff_bottom && ffb_bottom<=ff_top) || + (ffb_top <= ff_top && ffb_top >= ff_bottom) || + (ffb_top >= ff_top && ffb_bottom <= ff_bottom) || + (ffb_top <= ff_top && ffb_bottom >= ff_bottom) ) { return false; } diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index c991bf374b..b59cb6c92a 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2593,7 +2593,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseChildren) TThinkerIterator it; AActor * mo; - while (mo = it.Next()) + while ((mo = it.Next())) { if ( mo->master == self ) {