diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-25 00:55:50 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-25 00:55:50 +0000 |
commit | 00c83cc02884f255924ae1c6799ea6fce3696d31 (patch) | |
tree | 33e210f054d5f45d46d18b2fe135dac15f74d444 /ppapi/native_client/src/trusted | |
parent | 9747a179f0d71d17db4d9675bc913f59194e2027 (diff) | |
download | chromium_src-00c83cc02884f255924ae1c6799ea6fce3696d31.zip chromium_src-00c83cc02884f255924ae1c6799ea6fce3696d31.tar.gz chromium_src-00c83cc02884f255924ae1c6799ea6fce3696d31.tar.bz2 |
Make inttypes.h and similar macro usage C++11-friendly.
"foo"PRIuS is a user-defined literal in C++11. Add spaces around these macros.
Likewise, L"\xab"L"c" is a user-defined literal, so insert a space in the
middle.
No functionality change.
BUG=chromium:263960
TBR=alokp@chromium.org, dmichael@chromium.org, enne@chromium.org, isherman@chromium.org, rsleevi@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/20182002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client/src/trusted')
11 files changed, 68 insertions, 64 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/file_downloader.cc b/ppapi/native_client/src/trusted/plugin/file_downloader.cc index d7be3b4..5da04c6 100644 --- a/ppapi/native_client/src/trusted/plugin/file_downloader.cc +++ b/ppapi/native_client/src/trusted/plugin/file_downloader.cc @@ -150,7 +150,8 @@ bool FileDownloader::Open( pp::CompletionCallback onload_callback = callback_factory_.NewCallback(start_notify); int32_t pp_error = url_loader_.Open(url_request, onload_callback); - PLUGIN_PRINTF(("FileDownloader::Open (pp_error=%"NACL_PRId32")\n", pp_error)); + PLUGIN_PRINTF(("FileDownloader::Open (pp_error=%" NACL_PRId32 ")\n", + pp_error)); CHECK(pp_error == PP_OK_COMPLETIONPENDING); return true; } @@ -250,17 +251,17 @@ bool FileDownloader::InitialResponseIsValid(int32_t pp_error) { switch (url_scheme_) { case SCHEME_CHROME_EXTENSION: PLUGIN_PRINTF(("FileDownloader::InitialResponseIsValid (chrome-extension " - "response status_code=%"NACL_PRId32")\n", status_code_)); + "response status_code=%" NACL_PRId32 ")\n", status_code_)); status_ok = (status_code_ == kExtensionUrlRequestStatusOk); break; case SCHEME_DATA: PLUGIN_PRINTF(("FileDownloader::InitialResponseIsValid (data URI " - "response status_code=%"NACL_PRId32")\n", status_code_)); + "response status_code=%" NACL_PRId32 ")\n", status_code_)); status_ok = (status_code_ == kDataUriRequestStatusOk); break; case SCHEME_OTHER: PLUGIN_PRINTF(("FileDownloader::InitialResponseIsValid (HTTP response " - "status_code=%"NACL_PRId32")\n", status_code_)); + "status_code=%" NACL_PRId32 ")\n", status_code_)); status_ok = (status_code_ == NACL_HTTP_STATUS_OK); break; } @@ -439,7 +440,7 @@ nacl::string FileDownloader::GetResponseHeaders() const { void FileDownloader::StreamFinishNotify(int32_t pp_error) { PLUGIN_PRINTF(( - "FileDownloader::StreamFinishNotify (pp_error=%"NACL_PRId32")\n", + "FileDownloader::StreamFinishNotify (pp_error=%" NACL_PRId32 ")\n", pp_error)); stream_finish_callback_.RunAndClear(pp_error); } diff --git a/ppapi/native_client/src/trusted/plugin/local_temp_file.cc b/ppapi/native_client/src/trusted/plugin/local_temp_file.cc index bee15ee..15917e7 100644 --- a/ppapi/native_client/src/trusted/plugin/local_temp_file.cc +++ b/ppapi/native_client/src/trusted/plugin/local_temp_file.cc @@ -84,7 +84,7 @@ void LocalTempFile::Initialize() { pp::Module::Get()->GetBrowserInterface(PPB_FILEIOTRUSTED_INTERFACE)); ++next_identifier; SNPRINTF(reinterpret_cast<char *>(identifier_), sizeof identifier_, - "%"NACL_PRIu32, next_identifier); + "%" NACL_PRIu32, next_identifier); } LocalTempFile::~LocalTempFile() { @@ -116,7 +116,7 @@ void LocalTempFile::OpenWrite(const pp::CompletionCallback& cb) { int32_t LocalTempFile::GetFD(int32_t pp_error, const pp::Resource& resource, bool is_writable) { - PLUGIN_PRINTF(("LocalTempFile::GetFD (pp_error=%"NACL_PRId32 + PLUGIN_PRINTF(("LocalTempFile::GetFD (pp_error=%" NACL_PRId32 ", is_writable=%d)\n", pp_error, is_writable)); if (pp_error != PP_OK) { PLUGIN_PRINTF(("LocalTempFile::GetFD pp_error != PP_OK\n")); diff --git a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc index 7f26587..90fe0f1 100644 --- a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc +++ b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc @@ -70,7 +70,8 @@ class ModulePpapi : public pp::Module { } virtual pp::Instance* CreateInstance(PP_Instance pp_instance) { - MODULE_PRINTF(("ModulePpapi::CreateInstance (pp_instance=%"NACL_PRId32")\n", + MODULE_PRINTF(("ModulePpapi::CreateInstance (pp_instance=%" NACL_PRId32 + ")\n", pp_instance)); Plugin* plugin = Plugin::New(pp_instance); MODULE_PRINTF(("ModulePpapi::CreateInstance (return %p)\n", diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc index 3c54c26..7146177 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.cc +++ b/ppapi/native_client/src/trusted/plugin/plugin.cc @@ -631,7 +631,7 @@ bool Plugin::NexeIsContentHandler() const { Plugin* Plugin::New(PP_Instance pp_instance) { - PLUGIN_PRINTF(("Plugin::New (pp_instance=%"NACL_PRId32")\n", pp_instance)); + PLUGIN_PRINTF(("Plugin::New (pp_instance=%" NACL_PRId32 ")\n", pp_instance)); Plugin* plugin = new Plugin(pp_instance); PLUGIN_PRINTF(("Plugin::New (plugin=%p)\n", static_cast<void*>(plugin))); if (plugin == NULL) { @@ -645,7 +645,7 @@ Plugin* Plugin::New(PP_Instance pp_instance) { // there is no need to log to JS console that there was an initialization // failure. Note that module loading functions will log their own errors. bool Plugin::Init(uint32_t argc, const char* argn[], const char* argv[]) { - PLUGIN_PRINTF(("Plugin::Init (argc=%"NACL_PRIu32")\n", argc)); + PLUGIN_PRINTF(("Plugin::Init (argc=%" NACL_PRIu32 ")\n", argc)); HistogramEnumerateOsArch(GetSandboxISA()); init_time_ = NaClGetTimeOfDayMicroseconds(); @@ -740,7 +740,7 @@ Plugin::Plugin(PP_Instance pp_instance) time_of_last_progress_event_(0), nacl_interface_(NULL) { PLUGIN_PRINTF(("Plugin::Plugin (this=%p, pp_instance=%" - NACL_PRId32")\n", static_cast<void*>(this), pp_instance)); + NACL_PRId32 ")\n", static_cast<void*>(this), pp_instance)); callback_factory_.Initialize(this); nexe_downloader_.Initialize(this); nacl_interface_ = GetNaClInterface(); @@ -844,10 +844,10 @@ void Plugin::HistogramStartupTimeMedium(const std::string& name, float dt) { } void Plugin::NexeFileDidOpen(int32_t pp_error) { - PLUGIN_PRINTF(("Plugin::NexeFileDidOpen (pp_error=%"NACL_PRId32")\n", + PLUGIN_PRINTF(("Plugin::NexeFileDidOpen (pp_error=%" NACL_PRId32 ")\n", pp_error)); struct NaClFileInfo info = nexe_downloader_.GetFileInfo(); - PLUGIN_PRINTF(("Plugin::NexeFileDidOpen (file_desc=%"NACL_PRId32")\n", + PLUGIN_PRINTF(("Plugin::NexeFileDidOpen (file_desc=%" NACL_PRId32 ")\n", info.desc)); HistogramHTTPStatusCode( is_installed_ ? @@ -953,7 +953,7 @@ void Plugin::CopyCrashLogToJsConsole() { size_t ix_start = 0; size_t ix_end; - PLUGIN_PRINTF(("Plugin::CopyCrashLogToJsConsole: got %"NACL_PRIuS" bytes\n", + PLUGIN_PRINTF(("Plugin::CopyCrashLogToJsConsole: got %" NACL_PRIuS " bytes\n", fatal_msg.size())); while (nacl::string::npos != (ix_end = fatal_msg.find('\n', ix_start))) { LogLineToConsole(this, fatal_msg.substr(ix_start, ix_end - ix_start)); @@ -965,7 +965,7 @@ void Plugin::CopyCrashLogToJsConsole() { } void Plugin::NexeDidCrash(int32_t pp_error) { - PLUGIN_PRINTF(("Plugin::NexeDidCrash (pp_error=%"NACL_PRId32")\n", + PLUGIN_PRINTF(("Plugin::NexeDidCrash (pp_error=%" NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { PLUGIN_PRINTF(("Plugin::NexeDidCrash: CallOnMainThread callback with" @@ -1012,7 +1012,7 @@ void Plugin::NexeDidCrash(int32_t pp_error) { } void Plugin::BitcodeDidTranslate(int32_t pp_error) { - PLUGIN_PRINTF(("Plugin::BitcodeDidTranslate (pp_error=%"NACL_PRId32")\n", + PLUGIN_PRINTF(("Plugin::BitcodeDidTranslate (pp_error=%" NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { // Error should have been reported by pnacl. Just return. @@ -1080,7 +1080,7 @@ void Plugin::ReportDeadNexe() { void Plugin::NaClManifestBufferReady(int32_t pp_error) { PLUGIN_PRINTF(("Plugin::NaClManifestBufferReady (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); ErrorInfo error_info; set_manifest_url(nexe_downloader_.url()); if (pp_error != PP_OK) { @@ -1117,7 +1117,7 @@ void Plugin::NaClManifestBufferReady(int32_t pp_error) { void Plugin::NaClManifestFileDidOpen(int32_t pp_error) { PLUGIN_PRINTF(("Plugin::NaClManifestFileDidOpen (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); HistogramTimeSmall("NaCl.Perf.StartupTime.ManifestDownload", nexe_downloader_.TimeSinceOpenMilliseconds()); HistogramHTTPStatusCode( @@ -1131,7 +1131,7 @@ void Plugin::NaClManifestFileDidOpen(int32_t pp_error) { set_manifest_url(nexe_downloader_.url()); struct NaClFileInfo info = nexe_downloader_.GetFileInfo(); PLUGIN_PRINTF(("Plugin::NaClManifestFileDidOpen (file_desc=%" - NACL_PRId32")\n", info.desc)); + NACL_PRId32 ")\n", info.desc)); if (pp_error != PP_OK || info.desc == NACL_NO_FILE_DESC) { if (pp_error == PP_ERROR_ABORTED) { ReportLoadAbort(); @@ -1313,7 +1313,7 @@ bool Plugin::SetManifestObject(const nacl::string& manifest_json, void Plugin::UrlDidOpenForStreamAsFile(int32_t pp_error, FileDownloader*& url_downloader, PP_CompletionCallback callback) { - PLUGIN_PRINTF(("Plugin::UrlDidOpen (pp_error=%"NACL_PRId32 + PLUGIN_PRINTF(("Plugin::UrlDidOpen (pp_error=%" NACL_PRId32 ", url_downloader=%p)\n", pp_error, static_cast<void*>(url_downloader))); url_downloaders_.erase(url_downloader); @@ -1513,7 +1513,7 @@ void Plugin::EnqueueProgressEvent(const char* event_type, uint64_t total_bytes) { PLUGIN_PRINTF(("Plugin::EnqueueProgressEvent (" "event_type='%s', url='%s', length_computable=%d, " - "loaded=%"NACL_PRIu64", total=%"NACL_PRIu64")\n", + "loaded=%" NACL_PRIu64 ", total=%" NACL_PRIu64 ")\n", event_type, url.c_str(), static_cast<int>(length_computable), @@ -1541,7 +1541,7 @@ void Plugin::ReportSelLdrLoadStatus(int status) { void Plugin::DispatchProgressEvent(int32_t result) { PLUGIN_PRINTF(("Plugin::DispatchProgressEvent (result=%" - NACL_PRId32")\n", result)); + NACL_PRId32 ")\n", result)); if (result < 0) { return; } @@ -1553,7 +1553,7 @@ void Plugin::DispatchProgressEvent(int32_t result) { progress_events_.pop(); PLUGIN_PRINTF(("Plugin::DispatchProgressEvent (" "event_type='%s', url='%s', length_computable=%d, " - "loaded=%"NACL_PRIu64", total=%"NACL_PRIu64")\n", + "loaded=%" NACL_PRIu64 ", total=%" NACL_PRIu64 ")\n", event->event_type(), event->url(), static_cast<int>(event->length_computable()), diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc index f446961..f22cfa4 100644 --- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc +++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc @@ -341,7 +341,7 @@ void PnaclCoordinator::ExitWithError() { // Signal that Pnacl translation completed normally. void PnaclCoordinator::TranslateFinished(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::TranslateFinished (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); // Bail out if there was an earlier error (e.g., pexe load failure). if (translate_finish_error_ != PP_OK) { ExitWithError(); @@ -475,7 +475,7 @@ void PnaclCoordinator::CachedNexeOpenedForWrite(int32_t pp_error) { } if (num_read < 0) { PLUGIN_PRINTF(("PnaclCoordinator::CachedNexeOpenedForWrite read failed " - "(error=%"NACL_PRId32")\n", num_read)); + "(error=%" NACL_PRId32 ")\n", num_read)); NexeWasCopiedToCache(PP_ERROR_FAILED); return; } @@ -488,8 +488,8 @@ void PnaclCoordinator::DidCopyNexeToCachePartial(int32_t pp_error, int32_t num_read_prev, int64_t cur_offset) { PLUGIN_PRINTF(("PnaclCoordinator::DidCopyNexeToCachePartial " - "(pp_error=%"NACL_PRId32", num_read_prev=%"NACL_PRId32"" - ", cur_offset=%"NACL_PRId64").\n", + "(pp_error=%" NACL_PRId32 ", num_read_prev=%" NACL_PRId32 + ", cur_offset=%" NACL_PRId64 ").\n", pp_error, num_read_prev, cur_offset)); // Assume we are done. if (pp_error == PP_OK) { @@ -498,7 +498,7 @@ void PnaclCoordinator::DidCopyNexeToCachePartial(int32_t pp_error, } if (pp_error < PP_OK) { PLUGIN_PRINTF(("PnaclCoordinator::DidCopyNexeToCachePartial failed (err=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); NexeWasCopiedToCache(pp_error); return; } @@ -507,15 +507,15 @@ void PnaclCoordinator::DidCopyNexeToCachePartial(int32_t pp_error, nacl::DescWrapper* read_wrapper = temp_nexe_file_->read_wrapper(); if (pp_error != num_read_prev) { PLUGIN_PRINTF(("PnaclCoordinator::DidCopyNexeToCachePartial partial " - "write (bytes_written=%"NACL_PRId32" vs " - "read=%"NACL_PRId32")\n", pp_error, num_read_prev)); + "write (bytes_written=%" NACL_PRId32 " vs " + "read=%" NACL_PRId32 ")\n", pp_error, num_read_prev)); CHECK(pp_error < num_read_prev); // Seek back to re-read the bytes that were not written. nacl_off64_t seek_result = read_wrapper->Seek(pp_error - num_read_prev, SEEK_CUR); if (seek_result < 0) { PLUGIN_PRINTF(("PnaclCoordinator::DidCopyNexeToCachePartial seek failed " - "(err=%"NACL_PRId64")\n", seek_result)); + "(err=%" NACL_PRId64 ")\n", seek_result)); NexeWasCopiedToCache(PP_ERROR_FAILED); return; } @@ -526,7 +526,7 @@ void PnaclCoordinator::DidCopyNexeToCachePartial(int32_t pp_error, int32_t num_read = nacl::assert_cast<int32_t>(read_wrapper->Read(buf, sizeof buf)); PLUGIN_PRINTF(("PnaclCoordinator::DidCopyNexeToCachePartial read (bytes=%" - NACL_PRId32")\n", num_read)); + NACL_PRId32 ")\n", num_read)); // Hit EOF or something. if (num_read == 0) { NexeWasCopiedToCache(PP_OK); @@ -534,14 +534,14 @@ void PnaclCoordinator::DidCopyNexeToCachePartial(int32_t pp_error, } if (num_read < 0) { PLUGIN_PRINTF(("PnaclCoordinator::DidCopyNexeToCachePartial read failed " - "(error=%"NACL_PRId32")\n", num_read)); + "(error=%" NACL_PRId32 ")\n", num_read)); NexeWasCopiedToCache(PP_ERROR_FAILED); return; } pp::CompletionCallback cb = callback_factory_.NewCallback( &PnaclCoordinator::DidCopyNexeToCachePartial, num_read, next_offset); PLUGIN_PRINTF(("PnaclCoordinator::CopyNexeToCache Writing (" - "bytes=%"NACL_PRId32", buf=%p, file_io=%p)\n", num_read, buf, + "bytes=%" NACL_PRId32 ", buf=%p, file_io=%p)\n", num_read, buf, cached_nexe_file_->write_file_io())); cached_nexe_file_->write_file_io()->Write(next_offset, buf, num_read, cb); } @@ -568,7 +568,7 @@ void PnaclCoordinator::CorruptCacheFileWasDeleted(int32_t delete_pp_error, // The cache file was certainly already opened by the time we tried // to write to it, so it should certainly be deletable. PLUGIN_PRINTF(("PnaclCoordinator::CorruptCacheFileWasDeleted " - "delete failed with pp_error=%"NACL_PRId32"\n", + "delete failed with pp_error=%" NACL_PRId32 "\n", delete_pp_error)); // fall through and report the original error. } @@ -594,7 +594,7 @@ void PnaclCoordinator::CorruptCacheFileWasDeleted(int32_t delete_pp_error, void PnaclCoordinator::NexeFileWasRenamed(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::NexeFileWasRenamed (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { if (pp_error == PP_ERROR_NOACCESS) { ReportPpapiError(ERROR_PNACL_CACHE_FINALIZE_RENAME_NOACCESS, @@ -635,7 +635,7 @@ void PnaclCoordinator::NexeFileWasRenamed(int32_t pp_error) { void PnaclCoordinator::NexeReadDidOpen(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::NexeReadDidOpen (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { if (pp_error == PP_ERROR_FILENOTFOUND) { ReportPpapiError(ERROR_PNACL_CACHE_FETCH_NOTFOUND, @@ -666,7 +666,7 @@ void PnaclCoordinator::NexeReadDidOpen(int32_t pp_error) { void PnaclCoordinator::ResourceInfoWasRead(int32_t pp_error) { PLUGIN_PRINTF(("PluginCoordinator::ResourceInfoWasRead (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); // Second step of loading resources: call StartLoad. pp::CompletionCallback resources_cb = callback_factory_.NewCallback(&PnaclCoordinator::ResourcesDidLoad); @@ -675,7 +675,7 @@ void PnaclCoordinator::ResourceInfoWasRead(int32_t pp_error) { void PnaclCoordinator::ResourcesDidLoad(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::ResourcesDidLoad (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { // Finer-grained error code should have already been reported by // the PnaclResources class. @@ -717,7 +717,7 @@ void PnaclCoordinator::ResourcesDidLoad(int32_t pp_error) { void PnaclCoordinator::FileSystemDidOpen(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::FileSystemDidOpen (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { if (pp_error == PP_ERROR_NOACCESS) { ReportPpapiError( @@ -756,7 +756,7 @@ void PnaclCoordinator::FileSystemDidOpen(int32_t pp_error) { void PnaclCoordinator::DirectoryWasCreated(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::DirectoryWasCreated (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_ERROR_FILEEXISTS && pp_error != PP_OK) { // Directory did not exist and could not be created. if (pp_error == PP_ERROR_NOACCESS) { @@ -878,7 +878,7 @@ void PnaclCoordinator::BitcodeStreamDidOpen(int32_t pp_error) { void PnaclCoordinator::NexeFdDidOpen(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::NexeFdDidOpen (pp_error=%" - NACL_PRId32", hit=%d, handle=%d)\n", pp_error, + NACL_PRId32 ", hit=%d, handle=%d)\n", pp_error, is_cache_hit_ == PP_TRUE, nexe_handle_)); if (pp_error < PP_OK) { @@ -923,7 +923,7 @@ void PnaclCoordinator::NexeFdDidOpen(int32_t pp_error) { void PnaclCoordinator::CachedFileDidOpen(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::CachedFileDidOpen (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error == PP_OK) { // Cache hit -- no need to stream the rest of the file. streaming_downloader_.reset(NULL); @@ -942,7 +942,7 @@ void PnaclCoordinator::CachedFileDidOpen(int32_t pp_error) { void PnaclCoordinator::BitcodeStreamDidFinish(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::BitcodeStreamDidFinish (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { // Defer reporting the error and cleanup until after the translation // thread returns, because it may be accessing the coordinator's @@ -971,7 +971,7 @@ void PnaclCoordinator::BitcodeStreamDidFinish(int32_t pp_error) { void PnaclCoordinator::BitcodeStreamGotData(int32_t pp_error, FileStreamData data) { PLUGIN_PRINTF(("PnaclCoordinator::BitcodeStreamGotData (pp_error=%" - NACL_PRId32", data=%p)\n", pp_error, data ? &(*data)[0] : 0)); + NACL_PRId32 ", data=%p)\n", pp_error, data ? &(*data)[0] : 0)); DCHECK(translate_thread_.get()); translate_thread_->PutBytes(data, pp_error); @@ -1029,7 +1029,7 @@ void PnaclCoordinator::GetCurrentProgress(int64_t* bytes_loaded, void PnaclCoordinator::ObjectFileDidOpen(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::ObjectFileDidOpen (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); if (pp_error != PP_OK) { ReportPpapiError(ERROR_PNACL_CREATE_TEMP, pp_error, @@ -1049,7 +1049,7 @@ void PnaclCoordinator::ObjectFileDidOpen(int32_t pp_error) { void PnaclCoordinator::RunTranslate(int32_t pp_error) { PLUGIN_PRINTF(("PnaclCoordinator::RunTranslate (pp_error=%" - NACL_PRId32")\n", pp_error)); + NACL_PRId32 ")\n", pp_error)); // Invoke llc followed by ld off the main thread. This allows use of // blocking RPCs that would otherwise block the JavaScript main thread. pp::CompletionCallback report_translate_finished = diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc index 2df7457..b27bad1 100644 --- a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc +++ b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc @@ -73,7 +73,8 @@ void PnaclTranslateThread::RunTranslate( // Called from main thread to send bytes to the translator. void PnaclTranslateThread::PutBytes(std::vector<char>* bytes, int count) { - PLUGIN_PRINTF(("PutBytes (this=%p, bytes=%p, size=%"NACL_PRIuS", count=%d)\n", + PLUGIN_PRINTF(("PutBytes (this=%p, bytes=%p, size=%" NACL_PRIuS + ", count=%d)\n", this, bytes, bytes ? bytes->size() : 0, count)); size_t buffer_size = 0; // If we are done (error or not), Signal the translation thread to stop. @@ -185,7 +186,8 @@ void PnaclTranslateThread::DoTranslate() { while(!done_ && data_buffers_.size() == 0) { NaClXCondVarWait(&buffer_cond_, &cond_mu_); } - PLUGIN_PRINTF(("PnaclTranslateThread awake (done=%d, size=%"NACL_PRIuS")\n", + PLUGIN_PRINTF(("PnaclTranslateThread awake (done=%d, size=%" NACL_PRIuS + ")\n", done_, data_buffers_.size())); if (data_buffers_.size() > 0) { std::vector<char> data; diff --git a/ppapi/native_client/src/trusted/plugin/scriptable_plugin.cc b/ppapi/native_client/src/trusted/plugin/scriptable_plugin.cc index 99144b5..5e39567 100644 --- a/ppapi/native_client/src/trusted/plugin/scriptable_plugin.cc +++ b/ppapi/native_client/src/trusted/plugin/scriptable_plugin.cc @@ -208,7 +208,7 @@ void ScriptablePlugin::GetAllPropertyNames(std::vector<pp::Var>* properties, pp::Var ScriptablePlugin::Call(const pp::Var& name, const std::vector<pp::Var>& args, pp::Var* exception) { - PLUGIN_PRINTF(("ScriptablePlugin::Call (name=%s, %"NACL_PRIuS + PLUGIN_PRINTF(("ScriptablePlugin::Call (name=%s, %" NACL_PRIuS " args)\n", name.DebugString().c_str(), args.size())); return Error("Call", name.DebugString().c_str(), "method invocation is not supported", exception); @@ -217,7 +217,7 @@ pp::Var ScriptablePlugin::Call(const pp::Var& name, pp::Var ScriptablePlugin::Construct(const std::vector<pp::Var>& args, pp::Var* exception) { - PLUGIN_PRINTF(("ScriptablePlugin::Construct (%"NACL_PRIuS + PLUGIN_PRINTF(("ScriptablePlugin::Construct (%" NACL_PRIuS " args)\n", args.size())); return Error("constructor", "Construct", "constructor is not supported", exception); diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc index f908f8b..2b43b2e6 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc @@ -537,8 +537,8 @@ void PluginReverseInterface::QuotaRequest_MainThreadResponse( int32_t err) { NaClLog(4, "PluginReverseInterface::QuotaRequest_MainThreadResponse:" - " (resource=%"NACL_PRIx32", offset=%"NACL_PRId64", requested=%" - NACL_PRId64", err=%"NACL_PRId32")\n", + " (resource=%" NACL_PRIx32 ", offset=%" NACL_PRId64 ", requested=%" + NACL_PRId64 ", err=%" NACL_PRId32 ")\n", request->data.resource, request->offset, request->bytes_requested, err); nacl::MutexLocker take(&mu_); @@ -556,8 +556,8 @@ int64_t PluginReverseInterface::RequestQuotaForWrite( nacl::string file_id, int64_t offset, int64_t bytes_to_write) { NaClLog(4, "PluginReverseInterface::RequestQuotaForWrite:" - " (file_id='%s', offset=%"NACL_PRId64", bytes_to_write=%" - NACL_PRId64")\n", file_id.c_str(), offset, bytes_to_write); + " (file_id='%s', offset=%" NACL_PRId64 ", bytes_to_write=%" + NACL_PRId64 ")\n", file_id.c_str(), offset, bytes_to_write); QuotaData quota_data; { nacl::MutexLocker take(&mu_); @@ -605,7 +605,7 @@ void PluginReverseInterface::AddQuotaManagedFile(const nacl::string& file_id, PP_Resource resource = file_io.pp_resource(); NaClLog(4, "PluginReverseInterface::AddQuotaManagedFile: " - "(file_id='%s', file_io_ref=%"NACL_PRIx32")\n", + "(file_id='%s', file_io_ref=%" NACL_PRIx32 ")\n", file_id.c_str(), resource); nacl::MutexLocker take(&mu_); uint64_t file_key = STRTOULL(file_id.c_str(), NULL, 10); @@ -670,7 +670,7 @@ bool ServiceRuntime::InitCommunication(nacl::DescWrapper* nacl_desc, } // Get connection capability to service runtime where the IMC // server/SRPC client is waiting for a rendezvous. - NaClLog(4, "ServiceRuntime: got 0x%"NACL_PRIxPTR"\n", + NaClLog(4, "ServiceRuntime: got 0x%" NACL_PRIxPTR "\n", (uintptr_t) out_conn_cap); nacl::DescWrapper* conn_cap = plugin_->wrapper_factory()->MakeGenericCleanup( out_conn_cap); diff --git a/ppapi/native_client/src/trusted/plugin/temporary_file.cc b/ppapi/native_client/src/trusted/plugin/temporary_file.cc index ac02db2..46167a1 100644 --- a/ppapi/native_client/src/trusted/plugin/temporary_file.cc +++ b/ppapi/native_client/src/trusted/plugin/temporary_file.cc @@ -30,7 +30,7 @@ TempFile::TempFile(Plugin* plugin) : plugin_(plugin), PLUGIN_PRINTF(("TempFile::TempFile\n")); ++next_identifier; SNPRINTF(reinterpret_cast<char *>(identifier_), sizeof identifier_, - "%"NACL_PRIu32, next_identifier); + "%" NACL_PRIu32, next_identifier); } TempFile::~TempFile() { diff --git a/ppapi/native_client/src/trusted/plugin/utility.h b/ppapi/native_client/src/trusted/plugin/utility.h index e670d8c..6b9b27e 100644 --- a/ppapi/native_client/src/trusted/plugin/utility.h +++ b/ppapi/native_client/src/trusted/plugin/utility.h @@ -44,7 +44,7 @@ extern FILE* NaClPluginLogFileEnv(); #define PLUGIN_PRINTF(args) do { \ INIT_PLUGIN_LOGGING(); \ if (0 != ::plugin::gNaClPluginDebugPrintEnabled) { \ - ::plugin::NaClPluginPrintLog("PLUGIN %"NACL_PRIu64": ", \ + ::plugin::NaClPluginPrintLog("PLUGIN %" NACL_PRIu64 ": ", \ NaClGetTimeOfDayMicroseconds()); \ ::plugin::NaClPluginPrintLog args; \ } \ diff --git a/ppapi/native_client/src/trusted/weak_ref/call_on_main_thread.h b/ppapi/native_client/src/trusted/weak_ref/call_on_main_thread.h index 6daeba4..a618795 100644 --- a/ppapi/native_client/src/trusted/weak_ref/call_on_main_thread.h +++ b/ppapi/native_client/src/trusted/weak_ref/call_on_main_thread.h @@ -165,8 +165,8 @@ class WeakRefMemberFuncBinder { data_(raw_data) {} void Invoke(int32_t err) { NaClLog2(kPpWeakRefModuleName, 4, - ("WeakRefMemberFuncBinder: Invoke obj 0x%"NACL_PRIxPTR - ", err%"NACL_PRId32"\n"), + ("WeakRefMemberFuncBinder: Invoke obj 0x%" NACL_PRIxPTR + ", err%" NACL_PRId32 "\n"), reinterpret_cast<uintptr_t>(object_), err); (object_->*raw_callback_fn_)(data_.get(), err); NaClLog2(kPpWeakRefModuleName, 4, @@ -182,7 +182,7 @@ template <typename R, typename E> void WeakRefMemberFuncInvoker( WeakRefMemberFuncBinder<R, E> *binder, int32_t err) { NaClLog2(kPpWeakRefModuleName, 4, - "WeakRefMemberFuncInvoker: %"NACL_PRIxPTR" %"NACL_PRId32"\n", + "WeakRefMemberFuncInvoker: %" NACL_PRIxPTR " %" NACL_PRId32 "\n", (uintptr_t) binder, err); binder->Invoke(err); @@ -210,7 +210,7 @@ pp::CompletionCallback WeakRefNewCallback( NaClLog2(kPpWeakRefModuleName, 4, "Entered WeakRefNewCallback\n"); NaClLog2(kPpWeakRefModuleName, 4, - "object 0x%"NACL_PRIxPTR"\n", + "object 0x%" NACL_PRIxPTR "\n", reinterpret_cast<uintptr_t>(object)); WeakRefMemberFuncBinder<R, E>* binder = new WeakRefMemberFuncBinder<R, E>(object, @@ -218,7 +218,7 @@ pp::CompletionCallback WeakRefNewCallback( raw_data); CHECK(binder != NULL); NaClLog2(kPpWeakRefModuleName, 4, - "WeakRefNewCallback: binder %"NACL_PRIxPTR"\n", + "WeakRefNewCallback: binder %" NACL_PRIxPTR "\n", (uintptr_t) binder); void (*weak_ref_member_func_invoker_ptr)( WeakRefMemberFuncBinder<R, E>* binder, |