summaryrefslogtreecommitdiffstats
path: root/o3d/utils
diff options
context:
space:
mode:
authorgspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 16:43:27 +0000
committergspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 16:43:27 +0000
commitd2fec012063ade5737c7075758574137e4d18410 (patch)
treec146eeb0aa3306931c044a569d5905698d91fef4 /o3d/utils
parentd1d12f3e73ab60a2bea0ad380cc227dbd165c3a6 (diff)
downloadchromium_src-d2fec012063ade5737c7075758574137e4d18410.zip
chromium_src-d2fec012063ade5737c7075758574137e4d18410.tar.gz
chromium_src-d2fec012063ade5737c7075758574137e4d18410.tar.bz2
This fixes a bunch of warnings that are in our code, in order for the GYP build to succeed.
Review URL: http://codereview.chromium.org/118346 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/utils')
-rw-r--r--o3d/utils/cross/file_text_reader.cc7
-rw-r--r--o3d/utils/cross/file_text_reader_test.cc7
-rw-r--r--o3d/utils/cross/json_writer.cc2
3 files changed, 13 insertions, 3 deletions
diff --git a/o3d/utils/cross/file_text_reader.cc b/o3d/utils/cross/file_text_reader.cc
index 39e5057..314be5e 100644
--- a/o3d/utils/cross/file_text_reader.cc
+++ b/o3d/utils/cross/file_text_reader.cc
@@ -171,7 +171,12 @@ std::string FileTextReader::ReadToEnd() {
size_t FileTextReader::GetFileSize() const {
struct stat file_info;
- ::fstat(::fileno(input_), &file_info);
+#if defined(OS_WIN)
+ int file_number = ::_fileno(input_);
+#else
+ int file_number = ::fileno(input_);
+#endif
+ ::fstat(file_number, &file_info);
return file_info.st_size;
}
diff --git a/o3d/utils/cross/file_text_reader_test.cc b/o3d/utils/cross/file_text_reader_test.cc
index b87e61d..3bf1415 100644
--- a/o3d/utils/cross/file_text_reader_test.cc
+++ b/o3d/utils/cross/file_text_reader_test.cc
@@ -95,7 +95,12 @@ class FileTextReaderTest : public testing::Test {
if (file_pointers_[i]) {
::fclose(file_pointers_[i]);
}
- ::unlink((tmp_base + kFileInfo[i].file_name_).c_str());
+ std::string path = tmp_base + kFileInfo[i].file_name_;
+#if defined(OS_WIN)
+ ::_unlink(path.c_str());
+#else
+ ::unlink(path.c_str());
+#endif
file_pointers_[i] = NULL;
}
}
diff --git a/o3d/utils/cross/json_writer.cc b/o3d/utils/cross/json_writer.cc
index 784d728..a49700e 100644
--- a/o3d/utils/cross/json_writer.cc
+++ b/o3d/utils/cross/json_writer.cc
@@ -210,7 +210,7 @@ void JsonWriter::WritePending() {
}
void JsonWriter::WriteEscapedString(const string& unescaped) {
- for (int i = 0; i < unescaped.length(); ++i) {
+ for (string::size_type i = 0; i < unescaped.length(); ++i) {
char c = unescaped[i];
switch (c) {
case '\"':