pebble sdk - error: expected identifier before '_Bool' -
i had following code when dealing sync tuple:
static void sync_tuple_changed_callback(const uint32_t key, const tuple* new_tuple, const tuple* old_tuple, void* context) { persist_write_bool(key,new_tuple->value->bool); }
however, tried building (in cloud pebble), , got error:
../src/main.c: in function 'sync_tuple_changed_callback': ../src/main.c:25:44: error: expected identifier before '_bool'
what's going on?
there no bool
member of value
union - best bet use uint8
member instead, passing 1 true , 0 false:
static void sync_tuple_changed_callback(const uint32_t key, const tuple* new_tuple, const tuple* old_tuple, void* context) { persist_write_bool(key,new_tuple->value->uint8 != 0); }
Comments
Post a Comment