mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Move calculate_string_hash into DC_FIELD_STRING
The calculate_string_hash is only used if DC_FIELD_STRING is defined, so this removes a warning for everybody who doesn't build against a libdivecomputer with DC_FIELD_STRING support. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a7a022d8db
commit
42d3ed0431
1 changed files with 1 additions and 1 deletions
|
@ -397,12 +397,12 @@ static uint32_t calculate_diveid(const unsigned char *fingerprint, unsigned int
|
||||||
return csum[0];
|
return csum[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DC_FIELD_STRING
|
||||||
static uint32_t calculate_string_hash(const char *str)
|
static uint32_t calculate_string_hash(const char *str)
|
||||||
{
|
{
|
||||||
return calculate_diveid(str, strlen(str));
|
return calculate_diveid(str, strlen(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DC_FIELD_STRING
|
|
||||||
static void parse_string_field(struct dive *dive, dc_field_string_t *str)
|
static void parse_string_field(struct dive *dive, dc_field_string_t *str)
|
||||||
{
|
{
|
||||||
// Our dive ID is the string hash of the "Dive ID" string
|
// Our dive ID is the string hash of the "Dive ID" string
|
||||||
|
|
Loading…
Reference in a new issue