- code cleanup based on additional gcc warnings

This commit is contained in:
Mark Vejvoda
2013-11-19 06:42:32 +00:00
parent 39b41cdfea
commit 66761ba760
11 changed files with 24 additions and 15 deletions

View File

@@ -130,7 +130,7 @@ void FileCRCPreCacheThread::execute() {
try {
unsigned int consumedWorkers = 0;
for(unsigned int workerIdx = 0; workerIdx < MAX_FileCRCPreCacheThread_WORKER_THREADS; ++workerIdx) {
for(unsigned int workerIdx = 0; workerIdx < (unsigned int)MAX_FileCRCPreCacheThread_WORKER_THREADS; ++workerIdx) {
if(getQuitStatus() == true) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
break;

View File

@@ -2863,7 +2863,7 @@ void BroadCastSocketThread::execute() {
// Subnet, IP Address
std::vector<std::string> ipSubnetMaskList;
for(unsigned int idx = 0; idx < ipList.size() && idx < MAX_NIC_COUNT; idx++) {
for(unsigned int idx = 0; idx < (unsigned int)ipList.size() && idx < (unsigned int)MAX_NIC_COUNT; idx++) {
string broadCastAddress = getNetworkInterfaceBroadcastAddress(ipList[idx]);
//printf("idx = %d broadCastAddress [%s]\n",idx,broadCastAddress.c_str());
@@ -2876,7 +2876,7 @@ void BroadCastSocketThread::execute() {
port = htons( Socket::getBroadCastPort() );
//for(unsigned int idx = 0; idx < ipList.size() && idx < MAX_NIC_COUNT; idx++) {
for(unsigned int idx = 0; idx < ipSubnetMaskList.size(); idx++) {
for(unsigned int idx = 0; idx < (unsigned int)ipSubnetMaskList.size(); idx++) {
// Create the broadcast socket
memset( &bcLocal[idx], 0, sizeof( struct sockaddr_in));
bcLocal[idx].sin_family = AF_INET;

View File

@@ -27,6 +27,15 @@ using namespace Shared::Util;
namespace Shared{ namespace Platform{
// Example values:
// DEFAULT_CHARSET (English) = 1
// GB2312_CHARSET (Chinese) = 134
#ifdef WIN32
DWORD PlatformContextGl::charSet = DEFAULT_CHARSET;
#else
int PlatformContextGl::charSet = 1;
#endif
// ======================================
// Global Fcs
// ======================================