Skip to content

Commit

Permalink
Merge pull request #157 from markandrus/tweaks
Browse files Browse the repository at this point in the history
Fixes a SEGFAULT I get when running the tests after compiling with clang
  • Loading branch information
scanner-darkly authored Aug 3, 2018
2 parents 60ed5be + 4db87a8 commit 3a21105
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/chaos.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef CHAOS_H
#define CHOAS_H
#define CHAOS_H
#include <stdint.h>

typedef enum {
Expand Down
14 changes: 8 additions & 6 deletions tests/op_mod_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ TEST op_stack_size() {
const tele_op_t *op = tele_ops[i];

if (op->get != NULL) {
scene_state_t ss = {}; // initalise to empty
// (needs dedicated initaliser)
scene_state_t ss;
ss_init(&ss);
exec_state_t es;
es_init(&es);
es_push(&es);
Expand All @@ -63,10 +63,11 @@ TEST op_stack_size() {
}

if (op->set != NULL) {
scene_state_t ss = {}; // initalise to empty
// (needs dedicated initaliser)
scene_state_t ss;
ss_init(&ss);
exec_state_t es;
es_init(&es);
es_push(&es);
command_state_t cs;
cs_init(&cs);

Expand All @@ -93,10 +94,11 @@ TEST mod_stack_size() {
for (size_t i = 0; i < E_MOD__LENGTH; i++) {
const tele_mod_t *mod = tele_mods[i];

scene_state_t ss = {}; // initalise to empty
// (needs dedicated initaliser)
scene_state_t ss;
ss_init(&ss);
exec_state_t es;
es_init(&es);
es_push(&es);
command_state_t cs;
cs_init(&cs);

Expand Down

0 comments on commit 3a21105

Please sign in to comment.