Skip to content

Commit

Permalink
Exclude is_sparse_index_type in non assert builds
Browse files Browse the repository at this point in the history
PR #6705 introduces the function is_sparse_index_type. However, it is
only used for assert checking. If no assets are checked, the function is
unused, and some compilers error out. This PR includes the function only
if asserts are checked.
  • Loading branch information
jnidzwetzki committed Mar 13, 2024
1 parent 3ec04e1 commit 8433e3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tsl/src/compression/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

static const char *sparse_index_types[] = { "min", "max" };

#ifdef USE_ASSERT_CHECKING
static bool
is_sparse_index_type(const char *type)
{
Expand All @@ -64,6 +65,7 @@ is_sparse_index_type(const char *type)

return false;
}
#endif

static void validate_hypertable_for_compression(Hypertable *ht);
static List *build_columndefs(CompressionSettings *settings, Oid src_relid);
Expand Down

0 comments on commit 8433e3b

Please sign in to comment.