mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Linux: Fix compiler warning about fwrite() return value being ignored.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@939 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -180,8 +180,16 @@ class ClientDownloadHandler : public CefDownloadHandler {
|
|||||||
std::vector<std::vector<char>*>::iterator it = data.begin();
|
std::vector<std::vector<char>*>::iterator it = data.begin();
|
||||||
for (; it != data.end(); ++it) {
|
for (; it != data.end(); ++it) {
|
||||||
std::vector<char>* buffer = *it;
|
std::vector<char>* buffer = *it;
|
||||||
if (file_)
|
if (file_) {
|
||||||
fwrite(&(*buffer)[0], buffer->size(), 1, file_);
|
size_t total = 0;
|
||||||
|
do {
|
||||||
|
size_t write =
|
||||||
|
fwrite(&(*buffer)[total], 1, buffer->size() - total, file_);
|
||||||
|
if (write == 0)
|
||||||
|
break;
|
||||||
|
total += write;
|
||||||
|
} while (total < buffer->size());
|
||||||
|
}
|
||||||
delete buffer;
|
delete buffer;
|
||||||
}
|
}
|
||||||
data.clear();
|
data.clear();
|
||||||
|
Reference in New Issue
Block a user