mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't define cur_setting in header file
The object cur_setting was defined in core/pref.h. Instead, declare it as extern and define it in core/parse.c. This silences a compiler warning, since inclusion of core/pref.h would define the object, which was then left unused in tests/testparse.cpp. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5960718075
commit
90ba4e5dca
2 changed files with 4 additions and 3 deletions
|
@ -16,7 +16,7 @@ int metric = 1;
|
||||||
int diveid = -1;
|
int diveid = -1;
|
||||||
|
|
||||||
event_allocation_t event_allocation = { .event.deleted = 1 };
|
event_allocation_t event_allocation = { .event.deleted = 1 };
|
||||||
|
struct parser_settings cur_settings;
|
||||||
|
|
||||||
struct divecomputer *cur_dc = NULL;
|
struct divecomputer *cur_dc = NULL;
|
||||||
struct dive *cur_dive = NULL;
|
struct dive *cur_dive = NULL;
|
||||||
|
|
|
@ -24,13 +24,14 @@ extern struct sample *cur_sample;
|
||||||
extern struct picture *cur_picture;
|
extern struct picture *cur_picture;
|
||||||
|
|
||||||
|
|
||||||
struct {
|
struct parser_settings {
|
||||||
struct {
|
struct {
|
||||||
const char *model;
|
const char *model;
|
||||||
uint32_t deviceid;
|
uint32_t deviceid;
|
||||||
const char *nickname, *serial_nr, *firmware;
|
const char *nickname, *serial_nr, *firmware;
|
||||||
} dc;
|
} dc;
|
||||||
} cur_settings;
|
};
|
||||||
|
extern struct parser_settings cur_settings;
|
||||||
|
|
||||||
extern bool in_settings;
|
extern bool in_settings;
|
||||||
extern bool in_userid;
|
extern bool in_userid;
|
||||||
|
|
Loading…
Add table
Reference in a new issue