summaryrefslogtreecommitdiff
path: root/python/examples/test_files/zero_init.c
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2023-07-26 11:02:15 -0700
committerMatthew Sotoudeh <matthew@masot.net>2023-07-26 11:02:15 -0700
commite29b2b00691b12ae70e97a072664bad073d81c4f (patch)
tree4cf2c79380baa41369ff8223f70e17d3da2bd812 /python/examples/test_files/zero_init.c
initial libdietc
Diffstat (limited to 'python/examples/test_files/zero_init.c')
-rw-r--r--python/examples/test_files/zero_init.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/python/examples/test_files/zero_init.c b/python/examples/test_files/zero_init.c
new file mode 100644
index 0000000..5db109a
--- /dev/null
+++ b/python/examples/test_files/zero_init.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+int set_xyz() {
+ int xyz = 1;
+ return xyz;
+}
+
+int foo() {
+ int xyz;
+ return xyz;
+}
+
+int main() {
+ printf("Foo return value: %d\n", foo());
+ set_xyz();
+ printf("Foo return value: %d\n", foo());
+ set_xyz();
+ printf("Foo return value: %d\n", foo());
+ return 0;
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback