summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/win/compiler-flags/uninit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/win/compiler-flags/uninit.cc')
-rw-r--r--third_party/python/gyp/test/win/compiler-flags/uninit.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/win/compiler-flags/uninit.cc b/third_party/python/gyp/test/win/compiler-flags/uninit.cc
new file mode 100644
index 0000000000..a9d5f5d483
--- /dev/null
+++ b/third_party/python/gyp/test/win/compiler-flags/uninit.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2012 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Should trigger C6001: using uninitialized memory <variable> for |i|.
+int f(bool b) {
+ int i;
+ if (b)
+ i = 0;
+ return i;
+}
+
+int main() {}