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

Side by Side Diff: runtime/vm/scanner.cc

Issue 10869063: Add attributions so printf like functions can have their arguments checked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 years, 3 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 | « runtime/vm/raw_object.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/scanner.h" 5 #include "vm/scanner.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 937
938 938
939 RawString* Scanner::AllocatePrivateKey(const Library& library) { 939 RawString* Scanner::AllocatePrivateKey(const Library& library) {
940 const String& url = String::Handle(library.url()); 940 const String& url = String::Handle(library.url());
941 intptr_t key_value = url.Hash(); 941 intptr_t key_value = url.Hash();
942 while (Library::IsKeyUsed(key_value)) { 942 while (Library::IsKeyUsed(key_value)) {
943 key_value++; 943 key_value++;
944 } 944 }
945 char private_key[32]; 945 char private_key[32];
946 OS::SNPrint(private_key, sizeof(private_key), 946 OS::SNPrint(private_key, sizeof(private_key),
947 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); 947 "%c%#"Px"", kPrivateKeySeparator, key_value);
948 const String& result = String::Handle(String::New(private_key, Heap::kOld)); 948 const String& result = String::Handle(String::New(private_key, Heap::kOld));
949 return result.raw(); 949 return result.raw();
950 } 950 }
951 951
952 952
953 void Scanner::InitOnce() { 953 void Scanner::InitOnce() {
954 } 954 }
955 955
956 } // namespace dart 956 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698