mirror of
https://github.com/SWG-Source/src.git
synced 2026-09-27 14:12:54 -04:00
most of the serious unused vars are removed, so i'll silence those now... and maaaaaany other fixes
This commit is contained in:
@@ -46,8 +46,6 @@ ClockStamp Clock::getCurTime()
|
||||
return ret;
|
||||
#else
|
||||
struct timeval tv;
|
||||
int err;
|
||||
err = gettimeofday(&tv, NULL);
|
||||
return (static_cast<ClockStamp>(tv.tv_sec) * 1000 + static_cast<ClockStamp>(tv.tv_usec / 1000));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -45,8 +45,11 @@ ClockStamp Clock::getCurTime()
|
||||
|
||||
return ret;
|
||||
#else
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wuninitialized"
|
||||
struct timeval tv;
|
||||
return (static_cast<ClockStamp>(tv.tv_sec) * 1000 + static_cast<ClockStamp>(tv.tv_usec / 1000));
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Base
|
||||
int k = l = 0;
|
||||
for(; l < i; l += 4)
|
||||
{
|
||||
ai[k] = achar0[l + j] & 0xff | (achar0[l + 1 + j] & 0xff) << 8 | (achar0[l + 2 + j] & 0xff) << 16 | (achar0[l + 3 + j] & 0xff) << 24;
|
||||
ai[k] = (achar0[l + j] & 0xff) | (achar0[l + 1 + j] & 0xff) << 8 | (achar0[l + 2 + j] & 0xff) << 16 | (achar0[l + 3 + j] & 0xff) << 24;
|
||||
k++;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Base
|
||||
|
||||
int MD5::FF(int i, int j, int k, int l, int i1, int j1, int k1)
|
||||
{
|
||||
i = uadd(i, j & k | ~j & l, i1, k1);
|
||||
i = uadd(i, (j & k) | (~j & l), i1, k1);
|
||||
return uadd(rotate_left(i, j1), j);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace Base
|
||||
|
||||
int MD5::GG(int i, int j, int k, int l, int i1, int j1, int k1)
|
||||
{
|
||||
i = uadd(i, j & l | k & ~l, i1, k1);
|
||||
i = uadd(i, (j & l) | (k & ~l), i1, k1);
|
||||
return uadd(rotate_left(i, j1), j);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ char * CSpanUtil::getDescriptionFromCardNum(const char *cardNum)
|
||||
char temp[8];
|
||||
memcpy(temp, cardNum, 7);
|
||||
temp[7] = 0;
|
||||
int value7 = atoi(temp);
|
||||
temp[6] = 0;
|
||||
int value6 = atoi(temp);
|
||||
temp[5] = 0;
|
||||
|
||||
@@ -83,7 +83,7 @@ template<typename T, typename P> PriorityQueue<T, P>::PriorityQueue(int queueSiz
|
||||
mQueueEnd = 0;
|
||||
mQueueSize = queueSize;
|
||||
mQueue = new QueueEntry[mQueueSize];
|
||||
memset(mQueue, 0, sizeof(mQueue));
|
||||
memset(mQueue, 0, mQueueSize);
|
||||
}
|
||||
|
||||
template<typename T, typename P> PriorityQueue<T, P>::~PriorityQueue()
|
||||
|
||||
@@ -44,13 +44,7 @@ std::string soegethostname()
|
||||
char res[NAME_SIZE];
|
||||
memset(res, 0, NAME_SIZE);
|
||||
std::string retVal;
|
||||
int error = gethostname(res, NAME_SIZE-1);
|
||||
|
||||
int errdetail;
|
||||
if(error !=0)
|
||||
{
|
||||
errdetail = errno;
|
||||
}
|
||||
retVal = res;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ template<typename T, typename P> PriorityQueue<T, P>::PriorityQueue(int queueSiz
|
||||
mQueueEnd = 0;
|
||||
mQueueSize = queueSize;
|
||||
mQueue = new QueueEntry[mQueueSize];
|
||||
memset(mQueue, 0, sizeof(mQueue));
|
||||
memset(mQueue, 0, mQueueSize);
|
||||
}
|
||||
|
||||
template<typename T, typename P> PriorityQueue<T, P>::~PriorityQueue()
|
||||
|
||||
@@ -264,7 +264,7 @@ namespace soe
|
||||
{
|
||||
int wchar_length=0; //number of utf-8 characters
|
||||
int code_size; //number of bytes each wchar
|
||||
int cur_bytes_count = 0;
|
||||
unsigned cur_bytes_count = 0;
|
||||
unsigned char byte;
|
||||
char *pout = output;
|
||||
|
||||
|
||||
@@ -46,8 +46,6 @@ ClockStamp Clock::getCurTime()
|
||||
return ret;
|
||||
#else
|
||||
struct timeval tv;
|
||||
int err;
|
||||
err = gettimeofday(&tv, NULL);
|
||||
return (static_cast<ClockStamp>(tv.tv_sec) * 1000 + static_cast<ClockStamp>(tv.tv_usec / 1000));
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user