diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-10 00:45:28 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-10 00:45:28 +0000 |
commit | 8da69f52a6eedded81e2c44e5c64cfab215516ce (patch) | |
tree | f108c6d91a8d9017d803c563a3477d1652758eb7 /mojo/examples/wget | |
parent | 9b00523e53559b874d1de527131baec833fb5489 (diff) | |
download | chromium_src-8da69f52a6eedded81e2c44e5c64cfab215516ce.zip chromium_src-8da69f52a6eedded81e2c44e5c64cfab215516ce.tar.gz chromium_src-8da69f52a6eedded81e2c44e5c64cfab215516ce.tar.bz2 |
Fixes another compile error when warnings are set
Or it may be just for arm, not sure which setting is triggering the
compile error.
BUG=none
TEST=none
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/355263002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/wget')
-rw-r--r-- | mojo/examples/wget/wget.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mojo/examples/wget/wget.cc b/mojo/examples/wget/wget.cc index 8fabbe6..9ec7e5c 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) { + printf("\nUnexpected error writing to file\n"); + break; + } } else { break; } |