aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/views/win
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-21 20:29:05 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-21 20:29:05 +0000
commitb58a639b2fbe919489654bb506efdb024a308a8e (patch)
tree0ff26896740fb590bed0e9dda85ecd930b7092bd /src/views/win
parent0042b9c2a2e6fe954cdfbcd5a5b7449cdf41a4c3 (diff)
Enable init'ed but unused var warning on windows for closer parity with mac/linux warnings.
Review URL: https://codereview.chromium.org/12536008 git-svn-id: http://skia.googlecode.com/svn/trunk@8307 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/views/win')
-rw-r--r--src/views/win/SkOSWindow_win.cpp3
-rw-r--r--src/views/win/skia_win.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/views/win/SkOSWindow_win.cpp b/src/views/win/SkOSWindow_win.cpp
index 0fdeba6156..9aeec6d16e 100644
--- a/src/views/win/SkOSWindow_win.cpp
+++ b/src/views/win/SkOSWindow_win.cpp
@@ -202,7 +202,7 @@ void SkOSWindow::doPaint(void* ctx) {
// buffer before passing to SetDIBitsToDevice().
SkASSERT(bitmap.width() * bitmap.bytesPerPixel() == bitmap.rowBytes());
bitmap.lockPixels();
- int iRet = SetDIBitsToDevice(hdc,
+ int ret = SetDIBitsToDevice(hdc,
0, 0,
bitmap.width(), bitmap.height(),
0, 0,
@@ -210,6 +210,7 @@ void SkOSWindow::doPaint(void* ctx) {
bitmap.getPixels(),
&bmi,
DIB_RGB_COLORS);
+ (void)ret; // we're ignoring potential failures for now.
bitmap.unlockPixels();
}
}
diff --git a/src/views/win/skia_win.cpp b/src/views/win/skia_win.cpp
index 327b0cdb96..2d66bd8280 100644
--- a/src/views/win/skia_win.cpp
+++ b/src/views/win/skia_win.cpp
@@ -138,7 +138,9 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow, LPTSTR lpCmdLine)
char* argv[4096];
int argc = 0;
TCHAR exename[1024], *next;
- int exenameLen = GetModuleFileName(NULL, exename, 1024);
+ int exenameLen = GetModuleFileName(NULL, exename, SK_ARRAY_COUNT(exename));
+ // we're ignoring the possibility that the exe name exceeds the exename buffer
+ (void) exenameLen;
argv[argc++] = tchar_to_utf8(exename);
TCHAR* arg = _tcstok_s(lpCmdLine, _T(" "), &next);
while (arg != NULL) {