mirror of https://github.com/axmolengine/axmol.git
Fix all gcc warnings in NaCl build.
This commit is contained in:
parent
38878b084b
commit
4d0aa01c4b
|
@ -208,7 +208,6 @@ namespace CocosDenshion
|
|||
ALenum format;
|
||||
int result;
|
||||
int section;
|
||||
int err;
|
||||
unsigned int size = 0;
|
||||
|
||||
if (ov_fopen(pszFilePath, &ogg_file) < 0)
|
||||
|
|
|
@ -34,6 +34,7 @@ NS_CC_BEGIN
|
|||
CCApplication* CCApplication::sm_pSharedApplication = 0;
|
||||
bool CCApplication::s_running = false;
|
||||
|
||||
/*
|
||||
static long getCurrentMillSecond()
|
||||
{
|
||||
long lLastTime;
|
||||
|
@ -43,6 +44,7 @@ static long getCurrentMillSecond()
|
|||
lLastTime = stCurrentTime.tv_sec * 1000 + stCurrentTime.tv_usec * 0.001;
|
||||
return lLastTime;
|
||||
}
|
||||
*/
|
||||
|
||||
CCApplication::CCApplication()
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ private:
|
|||
CCFileUtilsNaCl() {}
|
||||
public:
|
||||
/* override funtions */
|
||||
bool init() {}
|
||||
bool init() { return true; }
|
||||
virtual std::string getWritablePath();
|
||||
virtual bool isFileExist(const std::string& strFilePath);
|
||||
};
|
||||
|
|
|
@ -78,7 +78,8 @@ public:
|
|||
iMaxLineHeight = 0;
|
||||
//Free all text lines
|
||||
size_t size = vLines.size();
|
||||
for (int i=0; i<size; ++i) {
|
||||
for (size_t i=0; i<size; ++i)
|
||||
{
|
||||
TextLine line = vLines[i];
|
||||
free(line.text);
|
||||
}
|
||||
|
@ -330,8 +331,6 @@ public:
|
|||
bool getBitmap(const char *text, int nWidth, int nHeight, CCImage::ETextAlign eAlignMask, const char * pFontName, float fontSize)
|
||||
{
|
||||
FT_Error iError;
|
||||
|
||||
bool bRet = false;
|
||||
if (libError)
|
||||
return false;
|
||||
|
||||
|
@ -427,7 +426,7 @@ private:
|
|||
int openFont(const std::string& fontName, uint fontSize, const std::string& fontNameOrig);
|
||||
std::string fileNameExtension(const std::string& pathName);
|
||||
|
||||
int m_cachedSize;
|
||||
uint m_cachedSize;
|
||||
FT_Face m_cachedFont;
|
||||
std::string m_cachedFontname;
|
||||
std::string m_cachedFontnameOrig;
|
||||
|
|
|
@ -265,10 +265,10 @@ bool CCTexturePVR::unpackPVRv2Data(unsigned char* data, unsigned int len)
|
|||
//Make sure that tag is in correct formatting
|
||||
pvrTag = CC_SWAP_INT32_LITTLE_TO_HOST(header->pvrTag);
|
||||
|
||||
if (gPVRTexIdentifier[0] != ((pvrTag >> 0) & 0xff) ||
|
||||
gPVRTexIdentifier[1] != ((pvrTag >> 8) & 0xff) ||
|
||||
gPVRTexIdentifier[2] != ((pvrTag >> 16) & 0xff) ||
|
||||
gPVRTexIdentifier[3] != ((pvrTag >> 24) & 0xff))
|
||||
if (gPVRTexIdentifier[0] != (char)(((pvrTag >> 0) & 0xff)) ||
|
||||
gPVRTexIdentifier[1] != (char)(((pvrTag >> 8) & 0xff)) ||
|
||||
gPVRTexIdentifier[2] != (char)(((pvrTag >> 16) & 0xff)) ||
|
||||
gPVRTexIdentifier[3] != (char)(((pvrTag >> 24) & 0xff)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -52,11 +52,12 @@ void downloadFiles(MainThreadRunner* runner, const char** filenames, int num_fil
|
|||
|
||||
void* cocos_main(void* arg)
|
||||
{
|
||||
CocosPepperInstance* instance = (CocosPepperInstance*)arg;
|
||||
fprintf(stderr, "in cocos_main\n");
|
||||
|
||||
#ifdef OLD_NACL_MOUNTS
|
||||
// TODO(sbc): remove this hack an replace with some kind of URL mount
|
||||
CocosPepperInstance* instance = (CocosPepperInstance*)arg;
|
||||
|
||||
mkdir("ipad", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
mkdir("iphone", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
mkdir("fonts", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
|
@ -71,7 +72,6 @@ void* cocos_main(void* arg)
|
|||
downloadFiles(instance->m_runner, filenames, sizeof(filenames)/sizeof(char*));
|
||||
#endif
|
||||
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
fprintf(stderr, "calling application->run\n");
|
||||
int rtn = CCApplication::sharedApplication()->run();
|
||||
fprintf(stderr, "app run returned: %d\n", rtn);
|
||||
|
|
|
@ -38,6 +38,7 @@ public:
|
|||
Test::Step(settings);
|
||||
|
||||
b2Sweep sweepA;
|
||||
sweepA.alpha0 = 0;
|
||||
sweepA.c0.Set(24.0f, -60.0f);
|
||||
sweepA.a0 = 2.95f;
|
||||
sweepA.c = sweepA.c0;
|
||||
|
@ -45,6 +46,7 @@ public:
|
|||
sweepA.localCenter.SetZero();
|
||||
|
||||
b2Sweep sweepB;
|
||||
sweepB.alpha0 = 0;
|
||||
sweepB.c0.Set(53.474274f, -50.252514f);
|
||||
sweepB.a0 = 513.36676f; // - 162.0f * b2_pi;
|
||||
sweepB.c.Set(54.595478f, -51.083473f);
|
||||
|
|
|
@ -129,7 +129,6 @@ void* cocos_main(void* arg)
|
|||
downloadFiles(instance->m_runner, filenames, sizeof(filenames)/sizeof(char*));
|
||||
#endif
|
||||
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
fprintf(stderr, "calling application->run\n");
|
||||
int rtn = CCApplication::sharedApplication()->run();
|
||||
fprintf(stderr, "app run returned: %d\n", rtn);
|
||||
|
|
|
@ -73,7 +73,6 @@ void* cocos_main(void* arg)
|
|||
downloadFiles(instance->m_runner, filenames, sizeof(filenames)/sizeof(char*));
|
||||
#endif
|
||||
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
fprintf(stderr, "calling application->run\n");
|
||||
int rtn = CCApplication::sharedApplication()->run();
|
||||
fprintf(stderr, "app run returned: %d\n", rtn);
|
||||
|
|
|
@ -133,7 +133,6 @@ void* cocos_main(void* arg)
|
|||
downloadFiles(instance->m_runner, filenames, sizeof(filenames)/sizeof(char*));
|
||||
#endif
|
||||
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
fprintf(stderr, "calling application->run\n");
|
||||
int rtn = CCApplication::sharedApplication()->run();
|
||||
fprintf(stderr, "app run returned: %d\n", rtn);
|
||||
|
|
Loading…
Reference in New Issue