Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: mojo/examples/wget/wget.cc

Issue 355263002: Fixes another compile error when warnings are set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: conditional Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/wget/wget.cc
diff --git a/mojo/examples/wget/wget.cc b/mojo/examples/wget/wget.cc
index 8fabbe65977eb91df367d593152d33fc14a2ae8f..9ec7e5cae126d9dfbaf0f338aa53f4cd3c160798 100644
--- a/mojo/examples/wget/wget.cc
+++ b/mojo/examples/wget/wget.cc
@@ -93,7 +93,10 @@ class WGetApp : public ApplicationDelegate, public URLLoaderClient {
MOJO_HANDLE_SIGNAL_READABLE,
MOJO_DEADLINE_INDEFINITE);
} else if (result == MOJO_RESULT_OK) {
- fwrite(buf, num_bytes, 1, stdout);
+ if (fwrite(buf, num_bytes, 1, stdout) != num_bytes) {
darin (slow to review) 2014/07/09 21:02:21 LGTM
+ printf("\nUnexpected error writing to file\n");
+ break;
+ }
} else {
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698