summaryrefslogtreecommitdiff
path: root/Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx')
-rw-r--r--Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx b/Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx
new file mode 100644
index 000000000..8ea5e404f
--- /dev/null
+++ b/Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+int main(int argc, const char* argv[])
+{
+ unsigned int i = 0; // "i<argc" should produce a "signed/unsigned comparison" warning
+ for (; i<argc; ++i)
+ {
+ fprintf(stdout, "%s\n", argv[i]);
+ }
+ return 0;
+}