Fix more unused vars for gcc

This commit is contained in:
Headline 2018-07-28 04:32:51 -07:00
parent 8d28c544a4
commit 7c64113acf
6 changed files with 5 additions and 21 deletions

View File

@ -383,14 +383,12 @@ bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args)
/* See if we need to do extra string manipulation */ /* See if we need to do extra string manipulation */
if (prepended) if (prepended)
{ {
size_t len;
/* Check if we need to prepend sm_ */ /* Check if we need to prepend sm_ */
if (prepended) if (prepended)
{ {
len = ke::SafeSprintf(m_ToExecute, sizeof(m_ToExecute), "sm_%s", args); ke::SafeSprintf(m_ToExecute, sizeof(m_ToExecute), "sm_%s", args);
} else { } else {
len = ke::SafeStrcpy(m_ToExecute, sizeof(m_ToExecute), args); ke::SafeStrcpy(m_ToExecute, sizeof(m_ToExecute), args);
} }
} else { } else {
ke::SafeStrcpy(m_ToExecute, sizeof(m_ToExecute), args); ke::SafeStrcpy(m_ToExecute, sizeof(m_ToExecute), args);

View File

@ -642,11 +642,6 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
/* First, preprocess the signature */ /* First, preprocess the signature */
unsigned char real_sig[511]; unsigned char real_sig[511];
size_t real_bytes; size_t real_bytes;
size_t length;
real_bytes = 0;
length = strlen(s_TempSig.sig);
real_bytes = UTIL_DecodeHexString(real_sig, sizeof(real_sig), s_TempSig.sig); real_bytes = UTIL_DecodeHexString(real_sig, sizeof(real_sig), s_TempSig.sig);
if (real_bytes >= 1) if (real_bytes >= 1)

View File

@ -335,7 +335,6 @@ SMCError TextParsers::ParseStream_SMC(void *stream,
unsigned int curlevel = 0; unsigned int curlevel = 0;
bool in_quote = false; bool in_quote = false;
bool ignoring = false; bool ignoring = false;
bool eol_comment = false;
bool ml_comment = false; bool ml_comment = false;
unsigned int i; unsigned int i;
SMCError err = SMCError_Okay; SMCError err = SMCError_Okay;
@ -406,7 +405,6 @@ SMCError TextParsers::ParseStream_SMC(void *stream,
} }
/* Next, let's clear some line-based values that may no longer have meaning */ /* Next, let's clear some line-based values that may no longer have meaning */
eol_comment = false;
in_quote = false; in_quote = false;
if (ignoring && !ml_comment) if (ignoring && !ml_comment)
{ {
@ -536,7 +534,6 @@ SMCError TextParsers::ParseStream_SMC(void *stream,
{ {
/* standard comment */ /* standard comment */
ignoring = true; ignoring = true;
eol_comment = true;
restage = true; restage = true;
} }
else if (parse_point[i+1] == '*') else if (parse_point[i+1] == '*')
@ -555,7 +552,6 @@ SMCError TextParsers::ParseStream_SMC(void *stream,
else else
{ {
ignoring = true; ignoring = true;
eol_comment = true;
restage = true; restage = true;
} }
} }

View File

@ -617,7 +617,6 @@ bool gnprintf(char *buffer,
int width; int width;
int prec; int prec;
int n; int n;
char sign;
const char *fmt; const char *fmt;
size_t llen = maxlen - 1; size_t llen = maxlen - 1;
@ -644,7 +643,6 @@ bool gnprintf(char *buffer,
flags = 0; flags = 0;
width = 0; width = 0;
prec = -1; prec = -1;
sign = '\0';
rflag: rflag:
ch = *fmt++; ch = *fmt++;
@ -1028,7 +1026,6 @@ size_t atcprintf(char *buffer, size_t maxlen, const char *format, IPluginContext
int width; int width;
int prec; int prec;
int n; int n;
char sign;
const char *fmt; const char *fmt;
size_t llen = maxlen - 1; size_t llen = maxlen - 1;
@ -1056,7 +1053,6 @@ size_t atcprintf(char *buffer, size_t maxlen, const char *format, IPluginContext
flags = 0; flags = 0;
width = 0; width = 0;
prec = -1; prec = -1;
sign = '\0';
rflag: rflag:
ch = *fmt++; ch = *fmt++;

View File

@ -1226,7 +1226,8 @@ static cell_t SetEntDataString(IPluginContext *pContext, const cell_t *params)
pProp->GetType(), \ pProp->GetType(), \
pProp->m_nBits, \ pProp->m_nBits, \
type); \ type); \
} } \
(void)bit_count; \
inline int MatchTypeDescAsInteger(_fieldtypes type, int flags) inline int MatchTypeDescAsInteger(_fieldtypes type, int flags)
@ -2035,7 +2036,7 @@ static cell_t SetEntPropVector(IPluginContext *pContext, const cell_t *params)
CBaseEntity *pEntity; CBaseEntity *pEntity;
char *prop; char *prop;
int offset; int offset;
int bit_count; int bit_count;
edict_t *pEdict; edict_t *pEdict;
int element = 0; int element = 0;

View File

@ -163,7 +163,6 @@ public:
unsigned int curidx; /* current node index */ unsigned int curidx; /* current node index */
const char *keyptr = key; /* input stream at current token */ const char *keyptr = key; /* input stream at current token */
KTrieNode *node = NULL; /* current node being processed */ KTrieNode *node = NULL; /* current node being processed */
KTrieNode *basenode = NULL; /* current base node being processed */
unsigned int q; /* temporary var for x_check results */ unsigned int q; /* temporary var for x_check results */
unsigned int curoffs; /* current offset */ unsigned int curoffs; /* current offset */
@ -196,7 +195,6 @@ public:
{ {
/* Find where the next character is, then advance */ /* Find where the next character is, then advance */
curidx = m_base[lastidx].idx; curidx = m_base[lastidx].idx;
basenode = &m_base[curidx];
curoffs = charval(*keyptr); curoffs = charval(*keyptr);
curidx += curoffs; curidx += curoffs;
node = &m_base[curidx]; node = &m_base[curidx];