Skip to content

Commit

Permalink
Fix Clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JNechaevsky committed Jun 28, 2024
1 parent 7e31b0e commit ddf651f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/doom/f_wipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static int *y;

// [JN] Function pointers to melt and crossfade effects.
static void (*wipe_init) (void);
static int (*wipe_do) (int ticks);
static const int (*wipe_do) (int ticks);

// [crispy] Additional fail-safe counter for performing crossfade effect.
static int fade_counter;
Expand Down Expand Up @@ -126,7 +126,7 @@ static void wipe_initCrossfade (void)
// wipe_doMelt
// -----------------------------------------------------------------------------

static int wipe_doMelt (int ticks)
static const int wipe_doMelt (int ticks)
{
int j;
int dy;
Expand Down
2 changes: 1 addition & 1 deletion src/doom/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ static int CarryError(double value, const double *prevcarry, double *carry)

static short CarryAngle(double angle)
{
if (lowres_turn && abs(angle + prevcarry.angle) < 128)
if (lowres_turn && fabs(angle + prevcarry.angle) < 128)
{
carry.angle = angle + prevcarry.angle;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/heretic/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static int CarryError(double value, const double *prevcarry, double *carry)

static short CarryAngle(double angle)
{
if (lowres_turn && abs(angle + prevcarry.angle) < 128)
if (lowres_turn && fabs(angle + prevcarry.angle) < 128)
{
carry.angle = angle + prevcarry.angle;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/hexen/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static int CarryError(double value, const double *prevcarry, double *carry)

static short CarryAngle(double angle)
{
if (lowres_turn && abs(angle + prevcarry.angle) < 128)
if (lowres_turn && fabs(angle + prevcarry.angle) < 128)
{
carry.angle = angle + prevcarry.angle;
return 0;
Expand Down

0 comments on commit ddf651f

Please sign in to comment.