Chromium Code Reviews

Side by Side Diff: test/cctest/test-compiler.cc

Issue 7779033: Fix a few clang warnings (which -Werror treats as errors) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-api.cc ('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 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 57 matching lines...)
68 for (int i = 0; i < args.Length(); i++) { 68 for (int i = 0; i < args.Length(); i++) {
69 if (i != 0) printf(" "); 69 if (i != 0) printf(" ");
70 v8::HandleScope scope; 70 v8::HandleScope scope;
71 v8::Handle<v8::Value> arg = args[i]; 71 v8::Handle<v8::Value> arg = args[i];
72 v8::Handle<v8::String> string_obj = arg->ToString(); 72 v8::Handle<v8::String> string_obj = arg->ToString();
73 if (string_obj.IsEmpty()) return string_obj; 73 if (string_obj.IsEmpty()) return string_obj;
74 int length = string_obj->Length(); 74 int length = string_obj->Length();
75 uint16_t* string = NewArray<uint16_t>(length + 1); 75 uint16_t* string = NewArray<uint16_t>(length + 1);
76 string_obj->Write(string); 76 string_obj->Write(string);
77 for (int j = 0; j < length; j++) 77 for (int j = 0; j < length; j++)
78 printf("%lc", static_cast<wint_t>(string[j])); 78 printf("%u", static_cast<wint_t>(string[j]));
Sven Panne 2011/09/05 11:39:36 This changes the output: Now we print the characte
Jakob Kummerow 2011/09/05 15:05:45 Done.
79 DeleteArray(string); 79 DeleteArray(string);
80 } 80 }
81 printf("\n"); 81 printf("\n");
82 return v8::Undefined(); 82 return v8::Undefined();
83 } 83 }
84 84
85 85
86 static PrintExtension kPrintExtension; 86 static PrintExtension kPrintExtension;
87 v8::DeclareExtension kPrintExtensionDeclaration(&kPrintExtension); 87 v8::DeclareExtension kPrintExtensionDeclaration(&kPrintExtension);
88 88
(...skipping 307 matching lines...)
396 CompileRun("function f() { a = 12345678 }; f();"); 396 CompileRun("function f() { a = 12345678 }; f();");
397 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 397 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
398 CompileRun("function f(x) { a = 12345678 + x}; f(1);"); 398 CompileRun("function f(x) { a = 12345678 + x}; f(1);");
399 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 399 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
400 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);"); 400 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);");
401 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 401 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
402 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);"); 402 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);");
403 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 403 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
404 } 404 }
405 #endif 405 #endif
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine