File: variant_array_schema_hidden_if_no_DEBUG.patch

package info (click to toggle)
genomicsdb 1.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,316 kB
  • sloc: cpp: 68,637; ansic: 58,281; java: 8,230; python: 2,315; sh: 2,115; perl: 1,621; makefile: 499; xml: 496
file content (20 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: adding preprocessor tests for DEBUG is necessary to avoid
 /<<PKGBUILDDIR>>/src/main/cpp/src/genomicsdb/variant_storage_manager.cc:154:24: error: ‘m_variant_array_schema’ was not declared in this scope; did you mean ‘VariantArraySchema’?
 154 |   assert(field_size == m_variant_array_schema->dim_size_in_bytes());
     |                        ^~~~~~~~~~~~~~~~~~~~~~
Author: Pierre Gruet <pgt@debian.org>
Forwarded: no
Last-Update: 2024-07-16

--- a/src/main/cpp/src/genomicsdb/variant_storage_manager.cc
+++ b/src/main/cpp/src/genomicsdb/variant_storage_manager.cc
@@ -151,7 +151,9 @@
       logger.fatal(VariantStorageManagerException(
           logger.format("Error while getting coordinate value from TileDB iterator : {}",
                         tiledb_errmsg)));
+#ifdef DEBUG
   assert(field_size == m_variant_array_schema->dim_size_in_bytes());
+#endif
   auto coords_ptr = reinterpret_cast<const int64_t*>(field_ptr);
   m_cell.set_coordinates(coords_ptr[0], coords_ptr[1]);
 #ifdef DO_PROFILING