aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorXavier ASUS <xavi92psx@gmail.com>2019-10-28 15:53:52 +0100
committerXavier ASUS <xavi92psx@gmail.com>2019-10-28 15:58:52 +0100
commitdc6912769121c335c6b09a6c002a4a8e0528703a (patch)
treefbc5bf85229996940d767c1ee1592eb2536a2f54 /src/main.c
First commit
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..03e5944
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,30 @@
+#include "bar.h"
+
+struct example
+{
+ int a;
+ char b;
+ int *c;
+};
+
+static void foo(struct example *const st)
+{
+ if (st)
+ {
+ if (st->c)
+ {
+ (*st->c)++;
+ }
+ }
+}
+
+_Noreturn void main(void)
+{
+ static struct example st;
+
+ foo(&st);
+
+ bar(st.a);
+
+ for (;;);
+}