Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: tools/skpdiff/skpdiff_util.cpp

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/skdiff_utils.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #if SK_BUILD_FOR_MAC || SK_BUILD_FOR_UNIX || SK_BUILD_FOR_ANDROID 8 #if SK_BUILD_FOR_MAC || SK_BUILD_FOR_UNIX || SK_BUILD_FOR_ANDROID
9 # include <unistd.h> 9 # include <unistd.h>
10 # include <sys/time.h> 10 # include <sys/time.h>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (!sk_isdir(joinedPath.c_str())) { 123 if (!sk_isdir(joinedPath.c_str())) {
124 entries->push_back(SkString(entry->d_name)); 124 entries->push_back(SkString(entry->d_name));
125 } 125 }
126 } 126 }
127 127
128 closedir(dir); 128 closedir(dir);
129 129
130 return true; 130 return true;
131 #elif SK_BUILD_FOR_WIN32 131 #elif SK_BUILD_FOR_WIN32
132 char pathDirGlob[MAX_PATH]; 132 char pathDirGlob[MAX_PATH];
133 char pathLength = strlen(path); 133 size_t pathLength = strlen(path);
134 strncpy(pathDirGlob, path, pathLength); 134 strncpy(pathDirGlob, path, pathLength);
135 135
136 if (path[pathLength - 1] == '/' || path[pathLength - 1] == '\\') { 136 if (path[pathLength - 1] == '/' || path[pathLength - 1] == '\\') {
137 SkASSERT(pathLength + 2 <= MAX_PATH); 137 SkASSERT(pathLength + 2 <= MAX_PATH);
138 pathDirGlob[pathLength] = '*'; 138 pathDirGlob[pathLength] = '*';
139 pathDirGlob[pathLength + 1] = '\0'; 139 pathDirGlob[pathLength + 1] = '\0';
140 } else { 140 } else {
141 SkASSERT(pathLength + 3 <= MAX_PATH); 141 SkASSERT(pathLength + 3 <= MAX_PATH);
142 pathDirGlob[pathLength] = '\\'; 142 pathDirGlob[pathLength] = '\\';
143 pathDirGlob[pathLength + 1] = '*'; 143 pathDirGlob[pathLength + 1] = '*';
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 #elif SK_BUILD_FOR_WIN32 197 #elif SK_BUILD_FOR_WIN32
198 SkString fullPath(MAX_PATH); 198 SkString fullPath(MAX_PATH);
199 if (_fullpath(fullPath.writable_str(), path.c_str(), MAX_PATH) == NULL) { 199 if (_fullpath(fullPath.writable_str(), path.c_str(), MAX_PATH) == NULL) {
200 fullPath.reset(); 200 fullPath.reset();
201 } 201 }
202 return fullPath; 202 return fullPath;
203 #else 203 #else
204 return SkString(); 204 return SkString();
205 #endif 205 #endif
206 } 206 }
OLDNEW
« no previous file with comments | « tools/skdiff_utils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698