ref: 86de35dda7b48126f4a8e246ab0c458dee628ed2
parent: 7a0db31614ec187e363e7664036d95ec56242e44
author: mfrancis95 <mikefrancis95@gmail.com>
date: Thu Oct 8 13:04:16 EDT 2020
Remove unused variable "state" in P_MovePsprites This fixes a warning generated by cppcheck.
--- a/src/doom/p_pspr.c
+++ b/src/doom/p_pspr.c
@@ -861,13 +861,12 @@
{
int i;
pspdef_t* psp;
- state_t* state;
psp = &player->psprites[0];
for (i=0 ; i<NUMPSPRITES ; i++, psp++)
{
// a null state means not active
- if ( (state = psp->state) )
+ if (psp->state)
{
// drop tic count and possibly change state
--- a/src/heretic/p_pspr.c
+++ b/src/heretic/p_pspr.c
@@ -1885,12 +1885,11 @@
{
int i;
pspdef_t *psp;
- state_t *state;
psp = &player->psprites[0];
for (i = 0; i < NUMPSPRITES; i++, psp++)
{
- if ((state = psp->state) != 0) // a null state means not active
+ if (psp->state != 0) // a null state means not active
{
// drop tic count and possibly change state
if (psp->tics != -1) // a -1 tic count never changes
--- a/src/hexen/p_pspr.c
+++ b/src/hexen/p_pspr.c
@@ -2457,12 +2457,11 @@
{
int i;
pspdef_t *psp;
- state_t *state;
psp = &player->psprites[0];
for (i = 0; i < NUMPSPRITES; i++, psp++)
{
- if ((state = psp->state) != 0) // a null state means not active
+ if (psp->state != 0) // a null state means not active
{
// drop tic count and possibly change state
if (psp->tics != -1) // a -1 tic count never changes
--- a/src/strife/p_pspr.c
+++ b/src/strife/p_pspr.c
@@ -970,13 +970,12 @@
{
int i;
pspdef_t* psp;
- state_t* state;
psp = &player->psprites[0];
for(i = 0; i < NUMPSPRITES; i++, psp++)
{
// a null state means not active
- if((state = psp->state))
+ if(psp->state)
{
// drop tic count and possibly change state