diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2014-05-20 07:58:13 +0300 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2014-05-20 07:58:13 +0300 |
| commit | 7702272fdd9cbb09c55d45e78cce18c57916b46b (patch) | |
| tree | 384c9602533bc887a6d9de9a71dd11cf593bb0c5 /atom.c | |
| parent | 66054b79b24a7e639a5c65771005da9af5627465 (diff) | |
| download | lispish-7702272fdd9cbb09c55d45e78cce18c57916b46b.tar.gz lispish-7702272fdd9cbb09c55d45e78cce18c57916b46b.zip | |
use -Wextra when compiling and fix some warnings produced by it
Diffstat (limited to 'atom.c')
| -rw-r--r-- | atom.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -6,15 +6,19 @@ #include <string.h> #include <stdarg.h> -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) |
