mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 06:48:04 +03:00
Fix linux warnings (and build?)
This commit is contained in:
parent
c343ecbe78
commit
21906adfdf
@ -1175,12 +1175,12 @@ int AMXAPI amx_GetNative(AMX *amx, int index, char *funcname)
|
|||||||
|
|
||||||
int AMXAPI amx_FindNative(AMX *amx, const char *name, int *index)
|
int AMXAPI amx_FindNative(AMX *amx, const char *name, int *index)
|
||||||
{
|
{
|
||||||
int first,last,mid;
|
int last,mid;
|
||||||
char pname[sNAMEMAX+1];
|
char pname[sNAMEMAX+1];
|
||||||
|
|
||||||
amx_NumNatives(amx, &last);
|
amx_NumNatives(amx, &last);
|
||||||
last--; /* last valid index is 1 less than the number of functions */
|
last--; /* last valid index is 1 less than the number of functions */
|
||||||
first=0;
|
|
||||||
/* normal search */
|
/* normal search */
|
||||||
for (mid=0; mid<=last; mid++)
|
for (mid=0; mid<=last; mid++)
|
||||||
{
|
{
|
||||||
|
@ -391,7 +391,7 @@ int Debugger::FormatError(char *buffer, size_t maxLength)
|
|||||||
//trace_info_t *pTrace = pTracer->GetEnd();
|
//trace_info_t *pTrace = pTracer->GetEnd();
|
||||||
//cell cip = _CipAsVa(m_pAmx->cip);
|
//cell cip = _CipAsVa(m_pAmx->cip);
|
||||||
//cell *p_cip = NULL;
|
//cell *p_cip = NULL;
|
||||||
int amx_err = AMX_ERR_NONE;
|
//int amx_err = AMX_ERR_NONE;
|
||||||
|
|
||||||
size += _snprintf(buffer, maxLength, "Run time error %d: %s ", error, gen_err);
|
size += _snprintf(buffer, maxLength, "Run time error %d: %s ", error, gen_err);
|
||||||
buffer += size;
|
buffer += size;
|
||||||
@ -410,7 +410,7 @@ int Debugger::FormatError(char *buffer, size_t maxLength)
|
|||||||
}*/
|
}*/
|
||||||
//New code only requires this...
|
//New code only requires this...
|
||||||
num = (int)(_INT_PTR)m_pAmx->usertags[UT_NATIVE];
|
num = (int)(_INT_PTR)m_pAmx->usertags[UT_NATIVE];
|
||||||
amx_err = amx_GetNative(m_pAmx, num, native_name);
|
/*amx_err = */amx_GetNative(m_pAmx, num, native_name);
|
||||||
/*if (num)
|
/*if (num)
|
||||||
amx_err = amx_GetNative(m_pAmx, (int)*p_cip, native_name);
|
amx_err = amx_GetNative(m_pAmx, (int)*p_cip, native_name);
|
||||||
else
|
else
|
||||||
|
@ -888,7 +888,7 @@ static cell AMX_NATIVE_CALL GetFileTime(AMX *amx, cell *params)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t time_val;
|
time_t time_val = -1;
|
||||||
|
|
||||||
switch( params[2] )
|
switch( params[2] )
|
||||||
{
|
{
|
||||||
|
@ -458,7 +458,7 @@ size_t atcprintf(D *buffer, size_t maxlen, const S *format, AMX *amx, cell *para
|
|||||||
int width;
|
int width;
|
||||||
int prec;
|
int prec;
|
||||||
int n;
|
int n;
|
||||||
char sign;
|
//char sign;
|
||||||
const S *fmt;
|
const S *fmt;
|
||||||
size_t llen = maxlen;
|
size_t llen = maxlen;
|
||||||
|
|
||||||
@ -486,7 +486,7 @@ size_t atcprintf(D *buffer, size_t maxlen, const S *format, AMX *amx, cell *para
|
|||||||
flags = 0;
|
flags = 0;
|
||||||
width = 0;
|
width = 0;
|
||||||
prec = -1;
|
prec = -1;
|
||||||
sign = '\0';
|
//sign = '\0';
|
||||||
|
|
||||||
rflag:
|
rflag:
|
||||||
ch = static_cast<D>(*fmt++);
|
ch = static_cast<D>(*fmt++);
|
||||||
|
@ -143,7 +143,7 @@ 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 */
|
//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 */
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ 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];
|
//basenode = &m_base[curidx];
|
||||||
curoffs = charval(*keyptr);
|
curoffs = charval(*keyptr);
|
||||||
curidx += curoffs;
|
curidx += curoffs;
|
||||||
node = &m_base[curidx];
|
node = &m_base[curidx];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user