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

Side by Side Diff: src/core/SkError.cpp

Issue 147053003: fix (some) 64bit warnings -- size_t -> int (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « src/core/SkEdgeBuilder.cpp ('k') | src/core/SkFontDescriptor.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkTLS.h" 9 #include "SkTLS.h"
10 #include "SkTypes.h" 10 #include "SkTypes.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 break; 123 break;
124 case kParseError_SkError: 124 case kParseError_SkError:
125 error_name = "Parse Error"; 125 error_name = "Parse Error";
126 break; 126 break;
127 default: 127 default:
128 error_name = "Unknown error"; 128 error_name = "Unknown error";
129 break; 129 break;
130 } 130 }
131 131
132 sprintf( str, "%s: ", error_name ); 132 sprintf( str, "%s: ", error_name );
133 int string_left = ERROR_STRING_LENGTH - strlen( str ); 133 int string_left = SkToInt(ERROR_STRING_LENGTH - strlen(str));
134 str += strlen(str); 134 str += strlen(str);
135 135
136 va_start( args, fmt ); 136 va_start( args, fmt );
137 vsnprintf( str, string_left, fmt, args ); 137 vsnprintf( str, string_left, fmt, args );
138 va_end( args ); 138 va_end( args );
139 SkErrorCallbackFunction fn = THREAD_ERROR_CALLBACK; 139 SkErrorCallbackFunction fn = THREAD_ERROR_CALLBACK;
140 if (fn && code != kNoError_SkError) { 140 if (fn && code != kNoError_SkError) {
141 fn(code, THREAD_ERROR_CONTEXT); 141 fn(code, THREAD_ERROR_CONTEXT);
142 } 142 }
143 } 143 }
OLDNEW
« no previous file with comments | « src/core/SkEdgeBuilder.cpp ('k') | src/core/SkFontDescriptor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698