diff options
author | sbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 01:12:43 +0000 |
---|---|---|
committer | sbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 01:12:43 +0000 |
commit | 7c71d672bd240bf1b7ea0213689dac79b73629e7 (patch) | |
tree | 61fab8eebe126c7633d5e2046faeadbbfd7c0973 /native_client_sdk/src/examples/demo | |
parent | f0fcfc652ea2c7ebf944eae0672faa7ba13e1714 (diff) | |
download | chromium_src-7c71d672bd240bf1b7ea0213689dac79b73629e7.zip chromium_src-7c71d672bd240bf1b7ea0213689dac79b73629e7.tar.gz chromium_src-7c71d672bd240bf1b7ea0213689dac79b73629e7.tar.bz2 |
[NaCl SDK] Bring back -Wall and fix or disable all warnings.
Add -Wall to all SDK project, but not to the default
common.mk system (we don't want to force this on external
users).
gtest generates warning in gcc which can be suppressed with
with a gcc-only flag that clang doesn't understand, so I
added the ability to set GCC-only CFLAGS. This seemed
better than forgoing the benefits of Wall on all
gtest-using projects.
R=binji@chromium.org
Review URL: https://codereview.chromium.org/19802008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src/examples/demo')
-rw-r--r-- | native_client_sdk/src/examples/demo/drive/drive.cc | 5 | ||||
-rw-r--r-- | native_client_sdk/src/examples/demo/nacl_io/handlers.c | 20 |
2 files changed, 2 insertions, 23 deletions
diff --git a/native_client_sdk/src/examples/demo/drive/drive.cc b/native_client_sdk/src/examples/demo/drive/drive.cc index 20449eb..6632ad02 100644 --- a/native_client_sdk/src/examples/demo/drive/drive.cc +++ b/native_client_sdk/src/examples/demo/drive/drive.cc @@ -135,7 +135,7 @@ int32_t ReadUrl(pp::Instance* instance, url_request.SetRecordDownloadProgress(false); - const size_t kReadBufferSize = 16 * 1024; + const int32_t kReadBufferSize = 16 * 1024; uint8_t* buffer_ = new uint8_t[kReadBufferSize]; do { @@ -257,7 +257,6 @@ int32_t InsertFile(pp::Instance* instance, Json::Value* root) { static const char base_url[] = "https://www.googleapis.com/upload/drive/v2/files"; - const char* method = "POST"; ReadUrlParams p; p.url = base_url; @@ -335,8 +334,8 @@ class Instance : public pp::Instance { Instance::Instance(PP_Instance instance) : pp::Instance(instance), - callback_factory_(this), worker_thread_(this), + callback_factory_(this), is_processing_request_(false) {} bool Instance::Init(uint32_t /*argc*/, diff --git a/native_client_sdk/src/examples/demo/nacl_io/handlers.c b/native_client_sdk/src/examples/demo/nacl_io/handlers.c index 2763e03..9182676 100644 --- a/native_client_sdk/src/examples/demo/nacl_io/handlers.c +++ b/native_client_sdk/src/examples/demo/nacl_io/handlers.c @@ -120,15 +120,6 @@ static void RemoveFileFromMap(int i) { } /** - * Get a file handle from the g_OpenFiles map. - * @param[in] i The index of the file handle to get. - * @return the FILE*, or NULL of there is no open file with that handle. - */ -static FILE* GetFileFromMap(int i) { - return (FILE*)GetFromMap((void**)g_OpenFiles, MAX_OPEN_FILES, i); -} - -/** * Get a file, given a string containing the index. * @param[in] s The string containing the file index. * @param[out] file_index The index of this file. @@ -156,14 +147,6 @@ static int AddDirToMap(DIR* dir) { static void RemoveDirFromMap(int i) { RemoveFromMap((void**)g_OpenDirs, MAX_OPEN_DIRS, i); } -/** - * Get a dir handle from the g_OpenDirs map. - * @param[in] i The index of the dir handle to get. - * @return the DIR*, or NULL of there is no open dir with that handle. - */ -static DIR* GetDirFromMap(int i) { - return (DIR*)GetFromMap((void**)g_OpenDirs, MAX_OPEN_DIRS, i); -} /** * Get a dir, given a string containing the index. @@ -450,10 +433,7 @@ int HandleFclose(int num_params, char** params, char** output) { * @param[out] output A string to write informational function output to. * @return An errorcode; 0 means success, anything else is a failure. */ int HandleStat(int num_params, char** params, char** output) { - FILE* file; - int file_index; const char* filename; - const char* mode; int result; struct stat buf; |