From 7702272fdd9cbb09c55d45e78cce18c57916b46b Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Tue, 20 May 2014 07:58:13 +0300 Subject: use -Wextra when compiling and fix some warnings produced by it --- atom.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'atom.c') diff --git a/atom.c b/atom.c index 43626d8..e3de9ce 100644 --- a/atom.c +++ b/atom.c @@ -6,15 +6,19 @@ #include #include -struct atom true_atom = { ATOM_TRUE }; -struct atom false_atom = { ATOM_FALSE }; -struct atom nil_atom = { ATOM_NIL } ; +struct atom true_atom; +struct atom false_atom; +struct atom nil_atom; __attribute__((constructor)) static void setup_builtin_atoms() { nil_atom.list = calloc(1, sizeof(*nil_atom.list)); LIST_INIT(nil_atom.list); + + true_atom.type = ATOM_TRUE; + false_atom.type = ATOM_FALSE; + nil_atom.type = ATOM_NIL; } struct atom *atom_new(char type) -- cgit v1.2.3