Merge pull request #8053 from minggo/fix-warning

[ci skip]fix warnings
This commit is contained in:
minggo 2014-09-15 16:25:19 +08:00
commit fcf3fe97a8
6 changed files with 32 additions and 7 deletions

View File

@ -96,14 +96,14 @@ void AudioCache::readDataTask()
auto error = ExtAudioFileOpenURL(fileURL, &extRef);
if(error) {
printf("%s: ExtAudioFileOpenURL FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileOpenURL FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}
// Get the audio data format
error = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &theFileFormat);
if(error) {
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}
if (theFileFormat.mChannelsPerFrame > 2) {
@ -126,7 +126,7 @@ void AudioCache::readDataTask()
error = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(outputFormat), &outputFormat);
if(error) {
printf("%s: ExtAudioFileSetProperty FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileSetProperty FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}
@ -134,7 +134,7 @@ void AudioCache::readDataTask()
thePropertySize = sizeof(theFileLengthInFrames);
error = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames);
if(error) {
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}

View File

@ -120,7 +120,7 @@ void AudioPlayer::rotateBufferThread(int offsetFrame)
auto error = ExtAudioFileOpenURL(fileURL, &extRef);
if(error) {
printf("%s: ExtAudioFileOpenURL FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileOpenURL FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitBufferThread;
}

View File

@ -1008,7 +1008,19 @@ void Director::purgeDirector()
FontFreeType::shutdownFreeType();
// purge all managed caches
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
DrawPrimitives::free();
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif
AnimationCache::destroyInstance();
SpriteFrameCache::destroyInstance();
GLProgramCache::destroyInstance();

View File

@ -101,7 +101,7 @@ GLViewImpl::GLViewImpl()
GLViewImpl::~GLViewImpl()
{
CCEAGLView *glview = (CCEAGLView*) _eaglview;
//CCEAGLView *glview = (CCEAGLView*) _eaglview;
//[glview release];
}

View File

@ -2,6 +2,13 @@
#include "renderer/CCRenderer.h"
#include "renderer/CCCustomCommand.h"
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
using namespace std;
static int sceneIdx = -1;
@ -387,3 +394,9 @@ void DrawPrimitivesTestScene::runThisTest()
Director::getInstance()->replaceScene(this);
}
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif

View File

@ -71,7 +71,7 @@ bool WebViewTest::init()
resetBtn->setPosition(Vec2(winSize/2) + Vec2(50, _webView->getContentSize().height/2 +
resetBtn->getContentSize().height/2 + 10));
resetBtn->addClickEventListener([=](Ref*){
_webView->loadUrl(std::string("http://") + urlTextField->getStringValue());
_webView->loadUrl(std::string("http://") + urlTextField->getString());
});
this->addChild(resetBtn);