summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 06:53:28 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 06:53:28 +0000
commit34b2b007db875a6acb853c5cd2a247fbb32c0f88 (patch)
tree6dc39bc9f10d6e8eedcdf14821ba9e96b5ccab51 /media
parent24b857793e27aded8d804a112a5fe6c77e28b081 (diff)
downloadchromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.zip
chromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.tar.gz
chromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.tar.bz2
Add compiler-specific "examine printf format" attributes to printfs.
Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/video_frame_impl_unittest.cc6
-rw-r--r--media/filters/ffmpeg_glue.cc2
2 files changed, 5 insertions, 3 deletions
diff --git a/media/base/video_frame_impl_unittest.cc b/media/base/video_frame_impl_unittest.cc
index 9d9573c..d50db36 100644
--- a/media/base/video_frame_impl_unittest.cc
+++ b/media/base/video_frame_impl_unittest.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "media/base/video_frame_impl.h"
+
+#include "base/format_macros.h"
#include "base/string_util.h"
#include "media/base/buffers.h"
#include "media/base/mock_filters.h"
-#include "media/base/video_frame_impl.h"
#include "media/base/yuv_convert.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -84,7 +86,7 @@ void ExpectFrameColor(media::VideoFrame* yv12_frame, uint32 expect_rgb_color) {
rgb_surface.data[VideoSurface::kRGBPlane] +
(rgb_surface.strides[VideoSurface::kRGBPlane] * row));
for (size_t col = 0; col < rgb_surface.width; ++col) {
- SCOPED_TRACE(StringPrintf("Checking (%u, %u)", row, col));
+ SCOPED_TRACE(StringPrintf("Checking (%" PRIuS ", %" PRIuS ")", row, col));
EXPECT_EQ(expect_rgb_color, rgb_row_data[col]);
}
}
diff --git a/media/filters/ffmpeg_glue.cc b/media/filters/ffmpeg_glue.cc
index 3c8433c..77b1f33 100644
--- a/media/filters/ffmpeg_glue.cc
+++ b/media/filters/ffmpeg_glue.cc
@@ -151,7 +151,7 @@ std::string FFmpegGlue::GetProtocolKey(FFmpegURLProtocol* protocol) {
// Use the FFmpegURLProtocol's memory address to generate the unique string.
// This also has the nice property that adding the same FFmpegURLProtocol
// reference will not generate duplicate entries.
- return StringPrintf("%s://0x%lx", kProtocol, static_cast<void*>(protocol));
+ return StringPrintf("%s://%p", kProtocol, static_cast<void*>(protocol));
}
} // namespace media