Created
May 18, 2020 23:32
-
-
Save benjeffery/9ae5cbbf68ceb7ceeee2bd102a31312d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /home/benj/projects/tskit/c/build/../tskit/convert.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/convert.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:77:37: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
| FILE *f = fopen("/dev/urandom", "r"); | |
| ^~~~ | |
| "re" | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:430:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return err ^ (1 << TSK_KAS_ERR_BIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:430:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return err ^ (1 << TSK_KAS_ERR_BIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:436:14: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(err & (1 << TSK_KAS_ERR_BIT)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:436:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(err & (1 << TSK_KAS_ERR_BIT)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:443:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| err ^= (1 << TSK_KAS_ERR_BIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:445:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
| } else { | |
| ^~~~~~ | |
| ../tskit/core.h:309:5: warning: function 'tsk_generate_uuid' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_generate_uuid(char *dest, int flags); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:100:1: note: the definition seen here | |
| tsk_generate_uuid(char *dest, int TSK_UNUSED(flags)) | |
| ^ | |
| ../tskit/core.h:309:5: note: differing parameters are named here: ('flags'), in definition: ('TSK_UNUSED_flags') | |
| int tsk_generate_uuid(char *dest, int flags); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:77:37: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
| FILE *f = fopen("/dev/urandom", "r"); | |
| ^~~~ | |
| "re" | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:430:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return err ^ (1 << TSK_KAS_ERR_BIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:430:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return err ^ (1 << TSK_KAS_ERR_BIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:436:14: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(err & (1 << TSK_KAS_ERR_BIT)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:436:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(err & (1 << TSK_KAS_ERR_BIT)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:443:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| err ^= (1 << TSK_KAS_ERR_BIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:445:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
| } else { | |
| ^~~~~~ | |
| ../tskit/core.h:309:5: warning: function 'tsk_generate_uuid' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_generate_uuid(char *dest, int flags); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/core.c:100:1: note: the definition seen here | |
| tsk_generate_uuid(char *dest, int TSK_UNUSED(flags)) | |
| ^ | |
| ../tskit/core.h:309:5: note: differing parameters are named here: ('flags'), in definition: ('TSK_UNUSED_flags') | |
| int tsk_generate_uuid(char *dest, int flags); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:87:30: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *' [clang-analyzer-unix.MallocSizeof] | |
| self->user_alleles_mem = malloc(total_len * sizeof(char *)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:87:30: note: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *' | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:94:9: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] | |
| strcpy(self->user_alleles_mem + offset, alleles[j]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:94:9: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:110:30: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:110:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| ../tskit/genotypes.h:36:34: note: expanded from macro 'TSK_IMPUTE_MISSING_DATA' | |
| #define TSK_IMPUTE_MISSING_DATA (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:160:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:160:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| ../tskit/genotypes.h:35:31: note: expanded from macro 'TSK_16_BIT_GENOTYPES' | |
| #define TSK_16_BIT_GENOTYPES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:176:75: warning: statement should be inside braces [hicpp-braces-around-statements] | |
| for (max_alleles = 0; alleles[max_alleles] != NULL; max_alleles++) | |
| ^ | |
| { | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:208:24: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tree_options = TSK_SAMPLE_LISTS; | |
| ^ | |
| ../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:248:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:248:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| ../tskit/genotypes.h:35:31: note: expanded from macro 'TSK_16_BIT_GENOTYPES' | |
| #define TSK_16_BIT_GENOTYPES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:497:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool genotypes16 = !!(self->options & TSK_16_BIT_GENOTYPES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:497:43: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool genotypes16 = !!(self->options & TSK_16_BIT_GENOTYPES); | |
| ^ | |
| ../tskit/genotypes.h:35:31: note: expanded from macro 'TSK_16_BIT_GENOTYPES' | |
| #define TSK_16_BIT_GENOTYPES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:498:30: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(self->options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:498:46: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(self->options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| ../tskit/genotypes.h:36:34: note: expanded from macro 'TSK_IMPUTE_MISSING_DATA' | |
| #define TSK_IMPUTE_MISSING_DATA (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:87:30: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *' [clang-analyzer-unix.MallocSizeof] | |
| self->user_alleles_mem = malloc(total_len * sizeof(char *)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:87:30: note: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *' | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:94:9: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] | |
| strcpy(self->user_alleles_mem + offset, alleles[j]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:94:9: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:110:30: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:110:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| ../tskit/genotypes.h:36:34: note: expanded from macro 'TSK_IMPUTE_MISSING_DATA' | |
| #define TSK_IMPUTE_MISSING_DATA (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:160:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:160:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| ../tskit/genotypes.h:35:31: note: expanded from macro 'TSK_16_BIT_GENOTYPES' | |
| #define TSK_16_BIT_GENOTYPES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:176:75: warning: statement should be inside braces [hicpp-braces-around-statements] | |
| for (max_alleles = 0; alleles[max_alleles] != NULL; max_alleles++) | |
| ^ | |
| { | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:208:24: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tree_options = TSK_SAMPLE_LISTS; | |
| ^ | |
| ../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:248:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:248:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_16_BIT_GENOTYPES) { | |
| ^ | |
| ../tskit/genotypes.h:35:31: note: expanded from macro 'TSK_16_BIT_GENOTYPES' | |
| #define TSK_16_BIT_GENOTYPES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:497:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool genotypes16 = !!(self->options & TSK_16_BIT_GENOTYPES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:497:43: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool genotypes16 = !!(self->options & TSK_16_BIT_GENOTYPES); | |
| ^ | |
| ../tskit/genotypes.h:35:31: note: expanded from macro 'TSK_16_BIT_GENOTYPES' | |
| #define TSK_16_BIT_GENOTYPES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:498:30: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(self->options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/genotypes.c:498:46: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool impute_missing = !!(self->options & TSK_IMPUTE_MISSING_DATA); | |
| ^ | |
| ../tskit/genotypes.h:36:34: note: expanded from macro 'TSK_IMPUTE_MISSING_DATA' | |
| #define TSK_IMPUTE_MISSING_DATA (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:25:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:120:13: warning: pointer parameter 'recombination_rate' can be pointer to const [readability-non-const-parameter] | |
| double *recombination_rate, double *mutation_rate, tsk_flags_t options) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:120:41: warning: pointer parameter 'mutation_rate' can be pointer to const [readability-non-const-parameter] | |
| double *recombination_rate, double *mutation_rate, tsk_flags_t options) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:171:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_ALLELES_ACGT) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:171:23: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_ALLELES_ACGT) { | |
| ^ | |
| ../tskit/haplotype_matching.h:36:27: note: expanded from macro 'TSK_ALLELES_ACGT' | |
| #define TSK_ALLELES_ACGT (1 << 16) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:531:19: warning: redundant cast to the same type [google-readability-casting] | |
| size_t base = (size_t) u * num_words; | |
| ^~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:551:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
| } else { | |
| ^~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:559:21: warning: redundant cast to the same type [google-readability-casting] | |
| size_t index = ((size_t) u) * num_words + (size_t)(state / 64); | |
| ^~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:560:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return (A[index] & (1ULL << (state % 64))) != 0; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:567:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| A[index] |= 1ULL << (state % 64); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:584:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| child = 1ULL << parent_state; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:604:33: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const uint64_t state_word = 1ULL << (parent_state % 64); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:641:33: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const uint64_t state_word = 1ULL << (parent_state % 64); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:906:36: warning: redundant cast to the same type [google-readability-casting] | |
| const unsigned int precision = (unsigned int) self->precision; | |
| ^~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1044:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1126:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1177:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| block_size = 1 << 20; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1315:53: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_tree_init(&tree, self->tree_sequence, TSK_SAMPLE_LISTS); | |
| ^ | |
| ../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1376:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| block_size = 1 << 20; /* 1MiB */ | |
| ^ | |
| ../tskit/haplotype_matching.h:163:5: warning: function 'tsk_viterbi_matrix_traceback' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_viterbi_matrix_traceback( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1510:1: note: the definition seen here | |
| tsk_viterbi_matrix_traceback( | |
| ^ | |
| ../tskit/haplotype_matching.h:163:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_viterbi_matrix_traceback( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:25:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:120:13: warning: pointer parameter 'recombination_rate' can be pointer to const [readability-non-const-parameter] | |
| double *recombination_rate, double *mutation_rate, tsk_flags_t options) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:120:41: warning: pointer parameter 'mutation_rate' can be pointer to const [readability-non-const-parameter] | |
| double *recombination_rate, double *mutation_rate, tsk_flags_t options) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:171:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_ALLELES_ACGT) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:171:23: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_ALLELES_ACGT) { | |
| ^ | |
| ../tskit/haplotype_matching.h:36:27: note: expanded from macro 'TSK_ALLELES_ACGT' | |
| #define TSK_ALLELES_ACGT (1 << 16) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:531:19: warning: redundant cast to the same type [google-readability-casting] | |
| size_t base = (size_t) u * num_words; | |
| ^~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:551:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
| } else { | |
| ^~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:559:21: warning: redundant cast to the same type [google-readability-casting] | |
| size_t index = ((size_t) u) * num_words + (size_t)(state / 64); | |
| ^~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:560:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return (A[index] & (1ULL << (state % 64))) != 0; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:567:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| A[index] |= 1ULL << (state % 64); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:584:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| child = 1ULL << parent_state; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:604:33: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const uint64_t state_word = 1ULL << (parent_state % 64); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:641:33: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const uint64_t state_word = 1ULL << (parent_state % 64); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:906:36: warning: redundant cast to the same type [google-readability-casting] | |
| const unsigned int precision = (unsigned int) self->precision; | |
| ^~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1044:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1126:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1177:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| block_size = 1 << 20; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1315:53: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_tree_init(&tree, self->tree_sequence, TSK_SAMPLE_LISTS); | |
| ^ | |
| ../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1376:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| block_size = 1 << 20; /* 1MiB */ | |
| ^ | |
| ../tskit/haplotype_matching.h:163:5: warning: function 'tsk_viterbi_matrix_traceback' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_viterbi_matrix_traceback( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/haplotype_matching.c:1510:1: note: the definition seen here | |
| tsk_viterbi_matrix_traceback( | |
| ^ | |
| ../tskit/haplotype_matching.h:163:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_viterbi_matrix_traceback( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/stats.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/stats.c:81:64: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_tree_init(self->outer_tree, self->tree_sequence, TSK_SAMPLE_LISTS); | |
| ^ | |
| ../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/stats.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/stats.c:81:64: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_tree_init(self->outer_tree, self->tree_sequence, TSK_SAMPLE_LISTS); | |
| ^ | |
| ../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:117:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| } else if (!(read_cols[j].options & TSK_COL_OPTIONAL)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:117:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| } else if (!(read_cols[j].options & TSK_COL_OPTIONAL)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:146:44: warning: pointer parameter 'offsets' can be pointer to const [readability-non-const-parameter] | |
| check_offsets(size_t num_rows, tsk_size_t *offsets, tsk_size_t length, bool check_length) | |
| ~~~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:295:32: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_rows_increment = (tsk_size_t) max_rows_increment; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:306:43: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_metadata_length_increment = (tsk_size_t) max_metadata_length_increment; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:317:43: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_location_length_increment = (tsk_size_t) max_location_length_increment; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:360:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:414:58: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_individual_table_expand_main_columns(self, (tsk_size_t) num_rows); | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:422:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->location_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:431:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->location_length + location_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:445:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:454:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:465:23: warning: redundant cast to the same type [google-readability-casting] | |
| self->num_rows += (tsk_size_t) num_rows; | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:504:54: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_individual_table_expand_location(self, (tsk_size_t) location_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:508:54: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_individual_table_expand_metadata(self, (tsk_size_t) metadata_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:513:9: warning: redundant cast to the same type [google-readability-casting] | |
| (tsk_size_t) location_length, metadata, (tsk_size_t) metadata_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:513:49: warning: redundant cast to the same type [google-readability-casting] | |
| (tsk_size_t) location_length, metadata, (tsk_size_t) metadata_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:600:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:747:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:897:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:964:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:989:23: warning: redundant cast to the same type [google-readability-casting] | |
| self->num_rows += (tsk_size_t) num_rows; | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1184:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1236:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1396:5: warning: Null pointer passed as an argument to a 'nonnull' parameter [clang-analyzer-core.NonNullParamChecker] | |
| memcpy(self->metadata + self->metadata_length, metadata, metadata_length); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5974:5: note: Loop condition is false. Execution continues on line 5991 | |
| for (j = start; j < end; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5991:11: note: Calling 'simplifier_merge_ancestors' | |
| ret = simplifier_merge_ancestors(self, parent); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5865:22: note: Assuming the condition is false | |
| bool is_sample = output_id != TSK_NULL; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5866:24: note: Assuming the condition is false | |
| bool keep_unary = !!(self->options & TSK_KEEP_UNARY); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5868:5: note: Taking false branch | |
| if (is_sample) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5878:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:12: note: Assuming the condition is true | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:5: note: Loop condition is true. Entering loop body | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5887:13: note: Assuming 'num_overlapping' is not equal to 1 | |
| if (num_overlapping == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5887:9: note: Taking false branch | |
| if (num_overlapping == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5905:13: note: Taking true branch | |
| if (output_id == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5907:17: note: Taking false branch | |
| if (ret < 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:13: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5915:17: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:13: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5915:17: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:25: note: Assuming 'j' is >= 'num_overlapping' | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:13: note: Loop condition is false. Execution continues on line 5920 | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5920:23: note: Left side of '&&' is false | |
| if (is_sample && left != prev_right) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5927:9: note: Taking true branch | |
| if (keep_unary) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5931:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:12: note: Assuming the condition is false | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:5: note: Loop condition is false. Execution continues on line 5937 | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5937:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5937:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5940:19: note: Left side of '&&' is false | |
| if (is_sample && prev_right != self->tables->sequence_length) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5948:9: note: Assuming the condition is true | |
| if (output_id != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5948:5: note: Taking true branch | |
| if (output_id != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5949:15: note: Calling 'simplifier_flush_edges' | |
| ret = simplifier_flush_edges(self, output_id, &num_flushed_edges); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:17: note: Assuming the condition is true | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:5: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:52: note: Assuming 'x' is equal to NULL | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:9: note: Loop condition is false. Execution continues on line 5489 | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:17: note: Assuming the condition is true | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:5: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:52: note: Assuming 'x' is not equal to NULL | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:9: note: Loop condition is true. Entering loop body | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5483:73: note: Passing null pointer value via 6th parameter 'metadata' | |
| &self->tables->edges, x->left, x->right, parent, child, NULL, 0); | |
| ^ | |
| /usr/lib/llvm-6.0/bin/../lib/clang/6.0.0/include/stddef.h:105:16: note: expanded from macro 'NULL' | |
| # define NULL ((void*)0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5482:19: note: Calling 'tsk_edge_table_add_row' | |
| ret = tsk_edge_table_add_row( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1386:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1390:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1396:5: note: Null pointer passed as an argument to a 'nonnull' parameter | |
| memcpy(self->metadata + self->metadata_length, metadata, metadata_length); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1415:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1485:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1634:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1683:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1685:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1687:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1927:30: warning: redundant cast to the same type [google-readability-casting] | |
| ancestral_state_offset = (tsk_size_t) self->ancestral_state_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1938:23: warning: redundant cast to the same type [google-readability-casting] | |
| metadata_offset = (tsk_size_t) self->metadata_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2032:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2164:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2269:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2365:42: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_derived_state_length = (tsk_size_t) new_size; | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2590:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2729:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2839:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3036:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3060:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3192:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3324:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3326:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| KAS_UINT32, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3328:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3465:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3639:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3742:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3919:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:4127:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:4329:56: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(tables, TSK_CHECK_OFFSETS); | |
| ^ | |
| ../tskit/tables.h:634:28: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:4940:67: warning: pointer parameter 'ancestors' can be pointer to const [readability-non-const-parameter] | |
| ancestor_mapper_init_ancestors(ancestor_mapper_t *self, tsk_id_t *ancestors) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5336:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| out, "\tfilter_unreferenced_sites: %d\n", !!(self->options & TSK_FILTER_SITES)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5336:70: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| out, "\tfilter_unreferenced_sites: %d\n", !!(self->options & TSK_FILTER_SITES)); | |
| ^ | |
| ../tskit/tables.h:627:27: note: expanded from macro 'TSK_FILTER_SITES' | |
| #define TSK_FILTER_SITES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5338:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| !!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5338:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| !!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)); | |
| ^ | |
| ../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5339:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| fprintf(out, "\tkeep_unary : %d\n", !!(self->options & TSK_KEEP_UNARY)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5339:61: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| fprintf(out, "\tkeep_unary : %d\n", !!(self->options & TSK_KEEP_UNARY)); | |
| ^ | |
| ../tskit/tables.h:631:25: note: expanded from macro 'TSK_KEEP_UNARY' | |
| #define TSK_KEEP_UNARY (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5393:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5393:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| ../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5444:61: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_node_table_get_row(&self->input_tables.nodes, (tsk_id_t) input_id, &node); | |
| ^~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5557:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5557:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| ../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5726:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tables, TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING | |
| ^ | |
| ../tskit/tables.h:634:27: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5726:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tables, TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING | |
| ^ | |
| ../tskit/tables.h:635:34: note: expanded from macro 'TSK_CHECK_EDGE_ORDERING' | |
| #define TSK_CHECK_EDGE_ORDERING (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5726:63: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tables, TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING | |
| ^ | |
| ../tskit/tables.h:636:34: note: expanded from macro 'TSK_CHECK_SITE_ORDERING' | |
| #define TSK_CHECK_SITE_ORDERING (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5727:23: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| | TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| ../tskit/tables.h:637:36: note: expanded from macro 'TSK_CHECK_SITE_DUPLICATES' | |
| #define TSK_CHECK_SITE_DUPLICATES (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5792:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5792:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| ../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5866:26: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool keep_unary = !!(self->options & TSK_KEEP_UNARY); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5866:42: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool keep_unary = !!(self->options & TSK_KEEP_UNARY); | |
| ^ | |
| ../tskit/tables.h:631:25: note: expanded from macro 'TSK_KEEP_UNARY' | |
| #define TSK_KEEP_UNARY (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6042:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_sites = !!(self->options & TSK_FILTER_SITES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6042:44: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_sites = !!(self->options & TSK_FILTER_SITES); | |
| ^ | |
| ../tskit/tables.h:627:27: note: expanded from macro 'TSK_FILTER_SITES' | |
| #define TSK_FILTER_SITES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6050:40: warning: redundant cast to the same type [google-readability-casting] | |
| &self->input_tables.sites, (tsk_id_t) input_site, &site); | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6061:17: warning: Value stored to 'mapped_parent' is never read [clang-analyzer-deadcode.DeadStores] | |
| mapped_parent = TSK_NULL; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6061:17: note: Value stored to 'mapped_parent' is never read | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6063:21: warning: Value stored to 'mapped_parent' is never read [clang-analyzer-deadcode.DeadStores] | |
| mapped_parent = self->mutation_id_map[input_parent]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6063:21: note: Value stored to 'mapped_parent' is never read | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6090:25: warning: redundant cast to the same type [google-readability-casting] | |
| (tsk_id_t) input_mutation, &mutation); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6135:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_populations = !!(self->options & TSK_FILTER_POPULATIONS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6135:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_populations = !!(self->options & TSK_FILTER_POPULATIONS); | |
| ^ | |
| ../tskit/tables.h:628:33: note: expanded from macro 'TSK_FILTER_POPULATIONS' | |
| #define TSK_FILTER_POPULATIONS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6144:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_individuals = !!(self->options & TSK_FILTER_INDIVIDUALS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6144:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_individuals = !!(self->options & TSK_FILTER_INDIVIDUALS); | |
| ^ | |
| ../tskit/tables.h:629:33: note: expanded from macro 'TSK_FILTER_INDIVIDUALS' | |
| #define TSK_FILTER_INDIVIDUALS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6230:70: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &self->input_tables.provenances, &self->tables->provenances, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6380:25: warning: Call to 'calloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| bool *parent_seen = calloc(self->nodes.num_rows, sizeof(bool)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6462:33: note: Assuming the condition is false | |
| bool check_site_ordering = !!(options & TSK_CHECK_SITE_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6463:35: note: Assuming the condition is false | |
| bool check_site_duplicates = !!(options & TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6464:37: note: Assuming the condition is false | |
| bool check_mutation_ordering = !!(options & TSK_CHECK_MUTATION_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6466:5: note: Taking false branch | |
| if (self->sequence_length <= 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6472:17: note: Assuming the condition is false | |
| for (j = 0; j < self->nodes.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6472:5: note: Loop condition is false. Execution continues on line 6491 | |
| for (j = 0; j < self->nodes.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6491:17: note: Assuming the condition is false | |
| for (j = 0; j < self->edges.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6491:5: note: Loop condition is false. Execution continues on line 6538 | |
| for (j = 0; j < self->edges.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6538:17: note: Assuming the condition is false | |
| for (j = 0; j < self->sites.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6538:5: note: Loop condition is false. Execution continues on line 6562 | |
| for (j = 0; j < self->sites.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6562:17: note: Assuming the condition is false | |
| for (j = 0; j < self->mutations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6562:5: note: Loop condition is false. Execution continues on line 6602 | |
| for (j = 0; j < self->mutations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6602:17: note: Assuming the condition is false | |
| for (j = 0; j < self->migrations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6602:5: note: Loop condition is false. Execution continues on line 6643 | |
| for (j = 0; j < self->migrations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:10: note: Assuming the condition is true | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:5: note: Taking false branch | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:10: note: Assuming the condition is true | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:5: note: Taking false branch | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:10: note: Assuming the condition is false | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:5: note: Taking true branch | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6670:15: note: Calling 'tsk_table_collection_check_edge_ordering' | |
| ret = tsk_table_collection_check_edge_ordering(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6380:25: note: Call to 'calloc' has an allocation size of 0 bytes | |
| bool *parent_seen = calloc(self->nodes.num_rows, sizeof(bool)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6462:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_ordering = !!(options & TSK_CHECK_SITE_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6462:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_ordering = !!(options & TSK_CHECK_SITE_ORDERING); | |
| ^ | |
| ../tskit/tables.h:636:34: note: expanded from macro 'TSK_CHECK_SITE_ORDERING' | |
| #define TSK_CHECK_SITE_ORDERING (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6463:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_duplicates = !!(options & TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6463:47: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_duplicates = !!(options & TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| ../tskit/tables.h:637:36: note: expanded from macro 'TSK_CHECK_SITE_DUPLICATES' | |
| #define TSK_CHECK_SITE_DUPLICATES (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6464:39: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_mutation_ordering = !!(options & TSK_CHECK_MUTATION_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6464:49: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_mutation_ordering = !!(options & TSK_CHECK_MUTATION_ORDERING); | |
| ^ | |
| ../tskit/tables.h:638:38: note: expanded from macro 'TSK_CHECK_MUTATION_ORDERING' | |
| #define TSK_CHECK_MUTATION_ORDERING (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| ../tskit/tables.h:639:28: note: expanded from macro 'TSK_CHECK_INDEXES' | |
| #define TSK_CHECK_INDEXES (1 << 5) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| ../tskit/tables.h:634:28: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| ../tskit/tables.h:635:34: note: expanded from macro 'TSK_CHECK_EDGE_ORDERING' | |
| #define TSK_CHECK_EDGE_ORDERING (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6824:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(self, TSK_CHECK_EDGE_ORDERING); | |
| ^ | |
| ../tskit/tables.h:635:34: note: expanded from macro 'TSK_CHECK_EDGE_ORDERING' | |
| #define TSK_CHECK_EDGE_ORDERING (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6879:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6885:59: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_node_table_copy(&self->nodes, &dest->nodes, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6889:59: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_edge_table_copy(&self->edges, &dest->edges, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6893:74: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_migration_table_copy(&self->migrations, &dest->migrations, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6897:59: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_site_table_copy(&self->sites, &dest->sites, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6901:71: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_mutation_table_copy(&self->mutations, &dest->mutations, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6905:77: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_individual_table_copy(&self->individuals, &dest->individuals, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6909:77: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_population_table_copy(&self->populations, &dest->populations, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6913:77: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_provenance_table_copy(&self->provenances, &dest->provenances, TSK_NO_INIT); | |
| ^ | |
| ../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7004:10: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((ret ^ (1 << TSK_KAS_ERR_BIT)) == KAS_ERR_KEY_NOT_FOUND) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7004:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((ret ^ (1 << TSK_KAS_ERR_BIT)) == KAS_ERR_KEY_NOT_FOUND) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7038:24: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| KAS_INT32, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7040:24: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| KAS_INT32, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7174:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((!(options & TSK_NO_BUILD_INDEXES)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7174:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((!(options & TSK_NO_BUILD_INDEXES)) | |
| ^ | |
| ../tskit/tables.h:645:31: note: expanded from macro 'TSK_NO_BUILD_INDEXES' | |
| #define TSK_NO_BUILD_INDEXES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7277:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_DEBUG)) { | |
| ^ | |
| ../tskit/tables.h:619:20: note: expanded from macro 'TSK_DEBUG' | |
| #define TSK_DEBUG (1u << 31) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| ../tskit/tables.h:641:6: note: expanded from macro 'TSK_CHECK_ALL' | |
| (TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING \ | |
| ^ | |
| ../tskit/tables.h:634:27: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:31: warning: use of a signed integer operand with a unary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:32: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| ../tskit/tables.h:637:36: note: expanded from macro 'TSK_CHECK_SITE_DUPLICATES' | |
| #define TSK_CHECK_SITE_DUPLICATES (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:60: warning: use of a signed integer operand with a unary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:61: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| ../tskit/tables.h:639:28: note: expanded from macro 'TSK_CHECK_INDEXES' | |
| #define TSK_CHECK_INDEXES (1 << 5) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7449:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(self, TSK_CHECK_ALL); | |
| ^ | |
| ../tskit/tables.h:641:6: note: expanded from macro 'TSK_CHECK_ALL' | |
| (TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING \ | |
| ^ | |
| ../tskit/tables.h:634:27: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| ../tskit/tables.h:673:5: warning: function 'tsk_individual_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_individual_table_init(tsk_individual_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:322:1: note: the definition seen here | |
| tsk_individual_table_init(tsk_individual_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| ../tskit/tables.h:673:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_individual_table_init(tsk_individual_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:816:5: warning: function 'tsk_individual_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_individual_table_set_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:378:1: note: the definition seen here | |
| tsk_individual_table_set_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:816:5: note: differing parameters are named here: ('location_length', 'metadata_length'), in definition: ('location_offset', 'metadata_offset') | |
| int tsk_individual_table_set_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:819:5: warning: function 'tsk_individual_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_individual_table_append_columns(tsk_individual_table_t *self, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:395:1: note: the definition seen here | |
| tsk_individual_table_append_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:819:5: note: differing parameters are named here: ('location_length', 'metadata_length'), in definition: ('location_offset', 'metadata_offset') | |
| int tsk_individual_table_append_columns(tsk_individual_table_t *self, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:849:5: warning: function 'tsk_node_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_node_table_init(tsk_node_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:867:1: note: the definition seen here | |
| tsk_node_table_init(tsk_node_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:849:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_node_table_init(tsk_node_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:987:5: warning: function 'tsk_node_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_node_table_set_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:915:1: note: the definition seen here | |
| tsk_node_table_set_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:987:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_node_table_set_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:990:5: warning: function 'tsk_node_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_node_table_append_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:932:1: note: the definition seen here | |
| tsk_node_table_append_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:990:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_node_table_append_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1014:5: warning: function 'tsk_edge_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_edge_table_init(tsk_edge_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1353:1: note: the definition seen here | |
| tsk_edge_table_init(tsk_edge_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1014:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_edge_table_init(tsk_edge_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1151:5: warning: function 'tsk_edge_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_edge_table_set_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1433:1: note: the definition seen here | |
| tsk_edge_table_set_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1151:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_edge_table_set_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1154:5: warning: function 'tsk_edge_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_edge_table_append_columns(tsk_edge_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1450:1: note: the definition seen here | |
| tsk_edge_table_append_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1154:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_edge_table_append_columns(tsk_edge_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1180:5: warning: function 'tsk_migration_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2971:1: note: the definition seen here | |
| tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1180:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1319:5: warning: function 'tsk_migration_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2971:1: note: the definition seen here | |
| tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1319:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1324:5: warning: function 'tsk_migration_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_set_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3079:1: note: the definition seen here | |
| tsk_migration_table_set_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1324:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_migration_table_set_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1327:5: warning: function 'tsk_migration_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_append_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2998:1: note: the definition seen here | |
| tsk_migration_table_append_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1327:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_migration_table_append_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1351:5: warning: function 'tsk_site_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_site_table_init(tsk_site_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1880:1: note: the definition seen here | |
| tsk_site_table_init(tsk_site_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1351:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_site_table_init(tsk_site_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1490:5: warning: function 'tsk_site_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_site_table_set_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2051:1: note: the definition seen here | |
| tsk_site_table_set_columns(tsk_site_table_t *self, tsk_size_t num_rows, double *position, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1490:5: note: differing parameters are named here: ('ancestral_state_length', 'metadata_length'), in definition: ('ancestral_state_offset', 'metadata_offset') | |
| int tsk_site_table_set_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1493:5: warning: function 'tsk_site_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_site_table_append_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1955:1: note: the definition seen here | |
| tsk_site_table_append_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1493:5: note: differing parameters are named here: ('ancestral_state_length', 'metadata_length'), in definition: ('ancestral_state_offset', 'metadata_offset') | |
| int tsk_site_table_append_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1517:5: warning: function 'tsk_mutation_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_init(tsk_mutation_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2428:1: note: the definition seen here | |
| tsk_mutation_table_init(tsk_mutation_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1517:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_mutation_table_init(tsk_mutation_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1574:5: warning: function 'tsk_mutation_table_truncate' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ ~~~~~ | |
| mutations | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2666:1: note: the definition seen here | |
| tsk_mutation_table_truncate(tsk_mutation_table_t *mutations, tsk_size_t num_rows) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1574:5: note: differing parameters are named here: ('self'), in definition: ('mutations') | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1659:5: warning: function 'tsk_mutation_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_set_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2609:1: note: the definition seen here | |
| tsk_mutation_table_set_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1659:5: note: differing parameters are named here: ('derived_state_length', 'metadata_length'), in definition: ('derived_state_offset', 'metadata_offset') | |
| int tsk_mutation_table_set_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1662:5: warning: function 'tsk_mutation_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_append_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2505:1: note: the definition seen here | |
| tsk_mutation_table_append_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1662:5: note: differing parameters are named here: ('derived_state_length', 'metadata_length'), in definition: ('derived_state_offset', 'metadata_offset') | |
| int tsk_mutation_table_append_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1667:5: warning: function 'tsk_mutation_table_truncate' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ ~~~~~ | |
| mutations | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2666:1: note: the definition seen here | |
| tsk_mutation_table_truncate(tsk_mutation_table_t *mutations, tsk_size_t num_rows) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1667:5: note: differing parameters are named here: ('self'), in definition: ('mutations') | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1695:5: warning: function 'tsk_population_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_population_table_init(tsk_population_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3434:1: note: the definition seen here | |
| tsk_population_table_init(tsk_population_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1695:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_population_table_init(tsk_population_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1854:5: warning: function 'tsk_provenance_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_provenance_table_init(tsk_provenance_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3882:1: note: the definition seen here | |
| tsk_provenance_table_init(tsk_provenance_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1854:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_provenance_table_init(tsk_provenance_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2018:5: warning: function 'tsk_table_collection_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_init(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6695:1: note: the definition seen here | |
| tsk_table_collection_init(tsk_table_collection_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2018:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_init(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2189:5: warning: function 'tsk_table_collection_record_num_rows' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_record_num_rows( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7541:1: note: the definition seen here | |
| tsk_table_collection_record_num_rows( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2189:5: note: differing parameters are named here: ('bookmark'), in definition: ('position') | |
| int tsk_table_collection_record_num_rows( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2206:5: warning: function 'tsk_table_collection_truncate' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_truncate( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7556:1: note: the definition seen here | |
| tsk_table_collection_truncate(tsk_table_collection_t *tables, tsk_bookmark_t *position) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2206:5: note: differing parameters are named here: ('self', 'bookmark'), in definition: ('tables', 'position') | |
| int tsk_table_collection_truncate( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2327:6: warning: function 'tsk_table_collection_has_index' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| bool tsk_table_collection_has_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6794:1: note: the definition seen here | |
| tsk_table_collection_has_index( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2327:6: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| bool tsk_table_collection_has_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2342:5: warning: function 'tsk_table_collection_drop_index' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_drop_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6802:1: note: the definition seen here | |
| tsk_table_collection_drop_index( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2342:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_drop_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2357:5: warning: function 'tsk_table_collection_build_index' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_build_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6813:1: note: the definition seen here | |
| tsk_table_collection_build_index( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2357:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_build_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2362:5: warning: function 'tsk_table_collection_link_ancestors' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_link_ancestors(tsk_table_collection_t *self, tsk_id_t *samples, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7289:1: note: the definition seen here | |
| tsk_table_collection_link_ancestors(tsk_table_collection_t *self, tsk_id_t *samples, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2362:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_link_ancestors(tsk_table_collection_t *self, tsk_id_t *samples, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2366:5: warning: function 'tsk_table_collection_deduplicate_sites' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_deduplicate_sites( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7354:1: note: the definition seen here | |
| tsk_table_collection_deduplicate_sites( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2366:5: note: differing parameters are named here: ('tables', 'options'), in definition: ('self', 'TSK_UNUSED_options') | |
| int tsk_table_collection_deduplicate_sites( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2368:5: warning: function 'tsk_table_collection_compute_mutation_parents' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_compute_mutation_parents( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7426:1: note: the definition seen here | |
| tsk_table_collection_compute_mutation_parents( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2368:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_compute_mutation_parents( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:117:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| } else if (!(read_cols[j].options & TSK_COL_OPTIONAL)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:117:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| } else if (!(read_cols[j].options & TSK_COL_OPTIONAL)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:146:44: warning: pointer parameter 'offsets' can be pointer to const [readability-non-const-parameter] | |
| check_offsets(size_t num_rows, tsk_size_t *offsets, tsk_size_t length, bool check_length) | |
| ~~~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:295:32: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_rows_increment = (tsk_size_t) max_rows_increment; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:306:43: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_metadata_length_increment = (tsk_size_t) max_metadata_length_increment; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:317:43: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_location_length_increment = (tsk_size_t) max_location_length_increment; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:360:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:414:58: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_individual_table_expand_main_columns(self, (tsk_size_t) num_rows); | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:422:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->location_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:431:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->location_length + location_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:445:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:454:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:465:23: warning: redundant cast to the same type [google-readability-casting] | |
| self->num_rows += (tsk_size_t) num_rows; | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:504:54: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_individual_table_expand_location(self, (tsk_size_t) location_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:508:54: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_individual_table_expand_metadata(self, (tsk_size_t) metadata_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:513:9: warning: redundant cast to the same type [google-readability-casting] | |
| (tsk_size_t) location_length, metadata, (tsk_size_t) metadata_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:513:49: warning: redundant cast to the same type [google-readability-casting] | |
| (tsk_size_t) location_length, metadata, (tsk_size_t) metadata_length); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:600:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:747:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:897:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:964:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:989:23: warning: redundant cast to the same type [google-readability-casting] | |
| self->num_rows += (tsk_size_t) num_rows; | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1184:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1236:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1396:5: warning: Null pointer passed as an argument to a 'nonnull' parameter [clang-analyzer-core.NonNullParamChecker] | |
| memcpy(self->metadata + self->metadata_length, metadata, metadata_length); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5974:5: note: Loop condition is false. Execution continues on line 5991 | |
| for (j = start; j < end; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5991:11: note: Calling 'simplifier_merge_ancestors' | |
| ret = simplifier_merge_ancestors(self, parent); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5865:22: note: Assuming the condition is false | |
| bool is_sample = output_id != TSK_NULL; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5866:24: note: Assuming the condition is false | |
| bool keep_unary = !!(self->options & TSK_KEEP_UNARY); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5868:5: note: Taking false branch | |
| if (is_sample) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5878:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:12: note: Assuming the condition is true | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:5: note: Loop condition is true. Entering loop body | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5887:13: note: Assuming 'num_overlapping' is not equal to 1 | |
| if (num_overlapping == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5887:9: note: Taking false branch | |
| if (num_overlapping == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5905:13: note: Taking true branch | |
| if (output_id == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5907:17: note: Taking false branch | |
| if (ret < 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:13: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5915:17: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:13: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5915:17: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:25: note: Assuming 'j' is >= 'num_overlapping' | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5913:13: note: Loop condition is false. Execution continues on line 5920 | |
| for (j = 0; j < num_overlapping; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5920:23: note: Left side of '&&' is false | |
| if (is_sample && left != prev_right) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5927:9: note: Taking true branch | |
| if (keep_unary) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5931:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:12: note: Assuming the condition is false | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5882:5: note: Loop condition is false. Execution continues on line 5937 | |
| while ((ret = segment_overlapper_next( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5937:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5937:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5940:19: note: Left side of '&&' is false | |
| if (is_sample && prev_right != self->tables->sequence_length) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5948:9: note: Assuming the condition is true | |
| if (output_id != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5948:5: note: Taking true branch | |
| if (output_id != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5949:15: note: Calling 'simplifier_flush_edges' | |
| ret = simplifier_flush_edges(self, output_id, &num_flushed_edges); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:17: note: Assuming the condition is true | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:5: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:52: note: Assuming 'x' is equal to NULL | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:9: note: Loop condition is false. Execution continues on line 5489 | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:17: note: Assuming the condition is true | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5479:5: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < self->num_buffered_children; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:52: note: Assuming 'x' is not equal to NULL | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5481:9: note: Loop condition is true. Entering loop body | |
| for (x = self->child_edge_map_head[child]; x != NULL; x = x->next) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5483:73: note: Passing null pointer value via 6th parameter 'metadata' | |
| &self->tables->edges, x->left, x->right, parent, child, NULL, 0); | |
| ^ | |
| /usr/lib/llvm-6.0/bin/../lib/clang/6.0.0/include/stddef.h:105:16: note: expanded from macro 'NULL' | |
| # define NULL ((void*)0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5482:19: note: Calling 'tsk_edge_table_add_row' | |
| ret = tsk_edge_table_add_row( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1386:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1390:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1396:5: note: Null pointer passed as an argument to a 'nonnull' parameter | |
| memcpy(self->metadata + self->metadata_length, metadata, metadata_length); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1415:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1485:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1634:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1683:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1685:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1687:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1927:30: warning: redundant cast to the same type [google-readability-casting] | |
| ancestral_state_offset = (tsk_size_t) self->ancestral_state_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1938:23: warning: redundant cast to the same type [google-readability-casting] | |
| metadata_offset = (tsk_size_t) self->metadata_length; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2032:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2164:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2269:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2365:42: warning: redundant cast to the same type [google-readability-casting] | |
| self->max_derived_state_length = (tsk_size_t) new_size; | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2590:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2729:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2839:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3036:19: warning: redundant cast to the same type [google-readability-casting] | |
| = (tsk_size_t) self->metadata_length + metadata_offset[j]; | |
| ^~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3060:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3192:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3324:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3326:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| KAS_UINT32, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3328:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3465:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3639:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3742:52: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &metadata_schema_length, 0, KAS_UINT8, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3919:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:4127:15: warning: redundant cast to the same type [google-readability-casting] | |
| row->id = (tsk_id_t) index; | |
| ^~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:4329:56: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(tables, TSK_CHECK_OFFSETS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:634:28: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:4940:67: warning: pointer parameter 'ancestors' can be pointer to const [readability-non-const-parameter] | |
| ancestor_mapper_init_ancestors(ancestor_mapper_t *self, tsk_id_t *ancestors) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5336:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| out, "\tfilter_unreferenced_sites: %d\n", !!(self->options & TSK_FILTER_SITES)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5336:70: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| out, "\tfilter_unreferenced_sites: %d\n", !!(self->options & TSK_FILTER_SITES)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:627:27: note: expanded from macro 'TSK_FILTER_SITES' | |
| #define TSK_FILTER_SITES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5338:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| !!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5338:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| !!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5339:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| fprintf(out, "\tkeep_unary : %d\n", !!(self->options & TSK_KEEP_UNARY)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5339:61: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| fprintf(out, "\tkeep_unary : %d\n", !!(self->options & TSK_KEEP_UNARY)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:631:25: note: expanded from macro 'TSK_KEEP_UNARY' | |
| #define TSK_KEEP_UNARY (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5393:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5393:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5444:61: warning: redundant cast to the same type [google-readability-casting] | |
| ret = tsk_node_table_get_row(&self->input_tables.nodes, (tsk_id_t) input_id, &node); | |
| ^~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5557:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5557:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5726:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tables, TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:634:27: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5726:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tables, TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:635:34: note: expanded from macro 'TSK_CHECK_EDGE_ORDERING' | |
| #define TSK_CHECK_EDGE_ORDERING (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5726:63: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| tables, TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:636:34: note: expanded from macro 'TSK_CHECK_SITE_ORDERING' | |
| #define TSK_CHECK_SITE_ORDERING (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5727:23: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| | TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:637:36: note: expanded from macro 'TSK_CHECK_SITE_DUPLICATES' | |
| #define TSK_CHECK_SITE_DUPLICATES (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5792:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5792:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(self->options & TSK_REDUCE_TO_SITE_TOPOLOGY)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:630:38: note: expanded from macro 'TSK_REDUCE_TO_SITE_TOPOLOGY' | |
| #define TSK_REDUCE_TO_SITE_TOPOLOGY (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5866:26: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool keep_unary = !!(self->options & TSK_KEEP_UNARY); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:5866:42: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool keep_unary = !!(self->options & TSK_KEEP_UNARY); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:631:25: note: expanded from macro 'TSK_KEEP_UNARY' | |
| #define TSK_KEEP_UNARY (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6042:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_sites = !!(self->options & TSK_FILTER_SITES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6042:44: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_sites = !!(self->options & TSK_FILTER_SITES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:627:27: note: expanded from macro 'TSK_FILTER_SITES' | |
| #define TSK_FILTER_SITES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6050:40: warning: redundant cast to the same type [google-readability-casting] | |
| &self->input_tables.sites, (tsk_id_t) input_site, &site); | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6061:17: warning: Value stored to 'mapped_parent' is never read [clang-analyzer-deadcode.DeadStores] | |
| mapped_parent = TSK_NULL; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6061:17: note: Value stored to 'mapped_parent' is never read | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6063:21: warning: Value stored to 'mapped_parent' is never read [clang-analyzer-deadcode.DeadStores] | |
| mapped_parent = self->mutation_id_map[input_parent]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6063:21: note: Value stored to 'mapped_parent' is never read | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6090:25: warning: redundant cast to the same type [google-readability-casting] | |
| (tsk_id_t) input_mutation, &mutation); | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6135:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_populations = !!(self->options & TSK_FILTER_POPULATIONS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6135:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_populations = !!(self->options & TSK_FILTER_POPULATIONS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:628:33: note: expanded from macro 'TSK_FILTER_POPULATIONS' | |
| #define TSK_FILTER_POPULATIONS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6144:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_individuals = !!(self->options & TSK_FILTER_INDIVIDUALS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6144:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool filter_individuals = !!(self->options & TSK_FILTER_INDIVIDUALS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:629:33: note: expanded from macro 'TSK_FILTER_INDIVIDUALS' | |
| #define TSK_FILTER_INDIVIDUALS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6230:70: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| &self->input_tables.provenances, &self->tables->provenances, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6380:25: warning: Call to 'calloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| bool *parent_seen = calloc(self->nodes.num_rows, sizeof(bool)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6462:33: note: Assuming the condition is false | |
| bool check_site_ordering = !!(options & TSK_CHECK_SITE_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6463:35: note: Assuming the condition is false | |
| bool check_site_duplicates = !!(options & TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6464:37: note: Assuming the condition is false | |
| bool check_mutation_ordering = !!(options & TSK_CHECK_MUTATION_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6466:5: note: Taking false branch | |
| if (self->sequence_length <= 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6472:17: note: Assuming the condition is false | |
| for (j = 0; j < self->nodes.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6472:5: note: Loop condition is false. Execution continues on line 6491 | |
| for (j = 0; j < self->nodes.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6491:17: note: Assuming the condition is false | |
| for (j = 0; j < self->edges.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6491:5: note: Loop condition is false. Execution continues on line 6538 | |
| for (j = 0; j < self->edges.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6538:17: note: Assuming the condition is false | |
| for (j = 0; j < self->sites.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6538:5: note: Loop condition is false. Execution continues on line 6562 | |
| for (j = 0; j < self->sites.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6562:17: note: Assuming the condition is false | |
| for (j = 0; j < self->mutations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6562:5: note: Loop condition is false. Execution continues on line 6602 | |
| for (j = 0; j < self->mutations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6602:17: note: Assuming the condition is false | |
| for (j = 0; j < self->migrations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6602:5: note: Loop condition is false. Execution continues on line 6643 | |
| for (j = 0; j < self->migrations.num_rows; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:10: note: Assuming the condition is true | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:5: note: Taking false branch | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:10: note: Assuming the condition is true | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:5: note: Taking false branch | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:10: note: Assuming the condition is false | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:5: note: Taking true branch | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6670:15: note: Calling 'tsk_table_collection_check_edge_ordering' | |
| ret = tsk_table_collection_check_edge_ordering(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6380:25: note: Call to 'calloc' has an allocation size of 0 bytes | |
| bool *parent_seen = calloc(self->nodes.num_rows, sizeof(bool)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6462:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_ordering = !!(options & TSK_CHECK_SITE_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6462:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_ordering = !!(options & TSK_CHECK_SITE_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:636:34: note: expanded from macro 'TSK_CHECK_SITE_ORDERING' | |
| #define TSK_CHECK_SITE_ORDERING (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6463:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_duplicates = !!(options & TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6463:47: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_site_duplicates = !!(options & TSK_CHECK_SITE_DUPLICATES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:637:36: note: expanded from macro 'TSK_CHECK_SITE_DUPLICATES' | |
| #define TSK_CHECK_SITE_DUPLICATES (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6464:39: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_mutation_ordering = !!(options & TSK_CHECK_MUTATION_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6464:49: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool check_mutation_ordering = !!(options & TSK_CHECK_MUTATION_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:638:38: note: expanded from macro 'TSK_CHECK_MUTATION_ORDERING' | |
| #define TSK_CHECK_MUTATION_ORDERING (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6474:23: warning: implicit conversion loses floating-point precision: 'double' to 'float' [clang-diagnostic-conversion] | |
| if (!isfinite(node_time)) { | |
| ^ | |
| /usr/include/math.h:629:50: note: expanded from macro 'isfinite' | |
| # define isfinite(x) __MATH_TG ((x), __finite, (x)) | |
| ^ | |
| /usr/include/math.h:559:16: note: expanded from macro '__MATH_TG' | |
| ? FUNC ## f ARGS \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6514:24: warning: implicit conversion loses floating-point precision: 'double' to 'float' [clang-diagnostic-conversion] | |
| if (!(isfinite(left) && isfinite(right))) { | |
| ^ | |
| /usr/include/math.h:629:50: note: expanded from macro 'isfinite' | |
| # define isfinite(x) __MATH_TG ((x), __finite, (x)) | |
| ^ | |
| /usr/include/math.h:559:16: note: expanded from macro '__MATH_TG' | |
| ? FUNC ## f ARGS \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6514:42: warning: implicit conversion loses floating-point precision: 'double' to 'float' [clang-diagnostic-conversion] | |
| if (!(isfinite(left) && isfinite(right))) { | |
| ^ | |
| /usr/include/math.h:629:50: note: expanded from macro 'isfinite' | |
| # define isfinite(x) __MATH_TG ((x), __finite, (x)) | |
| ^ | |
| /usr/include/math.h:559:16: note: expanded from macro '__MATH_TG' | |
| ? FUNC ## f ARGS \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6541:23: warning: implicit conversion loses floating-point precision: 'double' to 'float' [clang-diagnostic-conversion] | |
| if (!isfinite(position)) { | |
| ^ | |
| /usr/include/math.h:629:50: note: expanded from macro 'isfinite' | |
| # define isfinite(x) __MATH_TG ((x), __finite, (x)) | |
| ^ | |
| /usr/include/math.h:559:16: note: expanded from macro '__MATH_TG' | |
| ? FUNC ## f ARGS \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6617:23: warning: implicit conversion loses floating-point precision: 'double' to 'float' [clang-diagnostic-conversion] | |
| if (!isfinite(self->migrations.time[j])) { | |
| ^ | |
| /usr/include/math.h:629:50: note: expanded from macro 'isfinite' | |
| # define isfinite(x) __MATH_TG ((x), __finite, (x)) | |
| ^ | |
| /usr/include/math.h:559:16: note: expanded from macro '__MATH_TG' | |
| ? FUNC ## f ARGS \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6625:24: warning: implicit conversion loses floating-point precision: 'double' to 'float' [clang-diagnostic-conversion] | |
| if (!(isfinite(left) && isfinite(right))) { | |
| ^ | |
| /usr/include/math.h:629:50: note: expanded from macro 'isfinite' | |
| # define isfinite(x) __MATH_TG ((x), __finite, (x)) | |
| ^ | |
| /usr/include/math.h:559:16: note: expanded from macro '__MATH_TG' | |
| ? FUNC ## f ARGS \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6625:42: warning: implicit conversion loses floating-point precision: 'double' to 'float' [clang-diagnostic-conversion] | |
| if (!(isfinite(left) && isfinite(right))) { | |
| ^ | |
| /usr/include/math.h:629:50: note: expanded from macro 'isfinite' | |
| # define isfinite(x) __MATH_TG ((x), __finite, (x)) | |
| ^ | |
| /usr/include/math.h:559:16: note: expanded from macro '__MATH_TG' | |
| ? FUNC ## f ARGS \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6643:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:639:28: note: expanded from macro 'TSK_CHECK_INDEXES' | |
| #define TSK_CHECK_INDEXES (1 << 5) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6663:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_OFFSETS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:634:28: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6669:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_CHECK_EDGE_ORDERING)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:635:34: note: expanded from macro 'TSK_CHECK_EDGE_ORDERING' | |
| #define TSK_CHECK_EDGE_ORDERING (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6824:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(self, TSK_CHECK_EDGE_ORDERING); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:635:34: note: expanded from macro 'TSK_CHECK_EDGE_ORDERING' | |
| #define TSK_CHECK_EDGE_ORDERING (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6879:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6885:59: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_node_table_copy(&self->nodes, &dest->nodes, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6889:59: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_edge_table_copy(&self->edges, &dest->edges, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6893:74: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_migration_table_copy(&self->migrations, &dest->migrations, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6897:59: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_site_table_copy(&self->sites, &dest->sites, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6901:71: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_mutation_table_copy(&self->mutations, &dest->mutations, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6905:77: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_individual_table_copy(&self->individuals, &dest->individuals, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6909:77: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_population_table_copy(&self->populations, &dest->populations, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6913:77: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_provenance_table_copy(&self->provenances, &dest->provenances, TSK_NO_INIT); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7004:10: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((ret ^ (1 << TSK_KAS_ERR_BIT)) == KAS_ERR_KEY_NOT_FOUND) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7004:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((ret ^ (1 << TSK_KAS_ERR_BIT)) == KAS_ERR_KEY_NOT_FOUND) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7038:24: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| KAS_INT32, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7040:24: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| KAS_INT32, TSK_COL_OPTIONAL }, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:40:27: note: expanded from macro 'TSK_COL_OPTIONAL' | |
| #define TSK_COL_OPTIONAL (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7174:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((!(options & TSK_NO_BUILD_INDEXES)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7174:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if ((!(options & TSK_NO_BUILD_INDEXES)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:645:31: note: expanded from macro 'TSK_NO_BUILD_INDEXES' | |
| #define TSK_NO_BUILD_INDEXES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7277:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_DEBUG)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:619:20: note: expanded from macro 'TSK_DEBUG' | |
| #define TSK_DEBUG (1u << 31) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:641:6: note: expanded from macro 'TSK_CHECK_ALL' | |
| (TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:634:27: note: expanded from macro 'TSK_CHECK_OFFSETS' | |
| #define TSK_CHECK_OFFSETS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:31: warning: use of a signed integer operand with a unary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:32: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:637:36: note: expanded from macro 'TSK_CHECK_SITE_DUPLICATES' | |
| #define TSK_CHECK_SITE_DUPLICATES (1 << 3) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:60: warning: use of a signed integer operand with a unary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7378:61: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| self, TSK_CHECK_ALL & ~TSK_CHECK_SITE_DUPLICATES & ~TSK_CHECK_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:639:28: note: expanded from macro 'TSK_CHECK_INDEXES' | |
| #define TSK_CHECK_INDEXES (1 << 5) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7449:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(self, TSK_CHECK_ALL); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:641:52: note: expanded from macro 'TSK_CHECK_ALL' | |
| (TSK_CHECK_OFFSETS | TSK_CHECK_EDGE_ORDERING | TSK_CHECK_SITE_ORDERING \ | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:636:34: note: expanded from macro 'TSK_CHECK_SITE_ORDERING' | |
| #define TSK_CHECK_SITE_ORDERING (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:673:5: warning: function 'tsk_individual_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_individual_table_init(tsk_individual_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:322:1: note: the definition seen here | |
| tsk_individual_table_init(tsk_individual_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:673:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_individual_table_init(tsk_individual_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:816:5: warning: function 'tsk_individual_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_individual_table_set_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:378:1: note: the definition seen here | |
| tsk_individual_table_set_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:816:5: note: differing parameters are named here: ('location_length', 'metadata_length'), in definition: ('location_offset', 'metadata_offset') | |
| int tsk_individual_table_set_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:819:5: warning: function 'tsk_individual_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_individual_table_append_columns(tsk_individual_table_t *self, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:395:1: note: the definition seen here | |
| tsk_individual_table_append_columns(tsk_individual_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:819:5: note: differing parameters are named here: ('location_length', 'metadata_length'), in definition: ('location_offset', 'metadata_offset') | |
| int tsk_individual_table_append_columns(tsk_individual_table_t *self, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:849:5: warning: function 'tsk_node_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_node_table_init(tsk_node_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:867:1: note: the definition seen here | |
| tsk_node_table_init(tsk_node_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:849:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_node_table_init(tsk_node_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:987:5: warning: function 'tsk_node_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_node_table_set_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:915:1: note: the definition seen here | |
| tsk_node_table_set_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:987:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_node_table_set_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:990:5: warning: function 'tsk_node_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_node_table_append_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:932:1: note: the definition seen here | |
| tsk_node_table_append_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:990:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_node_table_append_columns(tsk_node_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1014:5: warning: function 'tsk_edge_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_edge_table_init(tsk_edge_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1353:1: note: the definition seen here | |
| tsk_edge_table_init(tsk_edge_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1014:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_edge_table_init(tsk_edge_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1151:5: warning: function 'tsk_edge_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_edge_table_set_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1433:1: note: the definition seen here | |
| tsk_edge_table_set_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1151:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_edge_table_set_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1154:5: warning: function 'tsk_edge_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_edge_table_append_columns(tsk_edge_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1450:1: note: the definition seen here | |
| tsk_edge_table_append_columns(tsk_edge_table_t *self, tsk_size_t num_rows, double *left, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1154:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_edge_table_append_columns(tsk_edge_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1180:5: warning: function 'tsk_migration_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2971:1: note: the definition seen here | |
| tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1180:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1319:5: warning: function 'tsk_migration_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2971:1: note: the definition seen here | |
| tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1319:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_migration_table_init(tsk_migration_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1324:5: warning: function 'tsk_migration_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_set_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3079:1: note: the definition seen here | |
| tsk_migration_table_set_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1324:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_migration_table_set_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1327:5: warning: function 'tsk_migration_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_migration_table_append_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2998:1: note: the definition seen here | |
| tsk_migration_table_append_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1327:5: note: differing parameters are named here: ('metadata_length'), in definition: ('metadata_offset') | |
| int tsk_migration_table_append_columns(tsk_migration_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1351:5: warning: function 'tsk_site_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_site_table_init(tsk_site_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1880:1: note: the definition seen here | |
| tsk_site_table_init(tsk_site_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1351:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_site_table_init(tsk_site_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1490:5: warning: function 'tsk_site_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_site_table_set_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2051:1: note: the definition seen here | |
| tsk_site_table_set_columns(tsk_site_table_t *self, tsk_size_t num_rows, double *position, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1490:5: note: differing parameters are named here: ('ancestral_state_length', 'metadata_length'), in definition: ('ancestral_state_offset', 'metadata_offset') | |
| int tsk_site_table_set_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1493:5: warning: function 'tsk_site_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_site_table_append_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:1955:1: note: the definition seen here | |
| tsk_site_table_append_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1493:5: note: differing parameters are named here: ('ancestral_state_length', 'metadata_length'), in definition: ('ancestral_state_offset', 'metadata_offset') | |
| int tsk_site_table_append_columns(tsk_site_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1517:5: warning: function 'tsk_mutation_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_init(tsk_mutation_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2428:1: note: the definition seen here | |
| tsk_mutation_table_init(tsk_mutation_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1517:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_mutation_table_init(tsk_mutation_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1574:5: warning: function 'tsk_mutation_table_truncate' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ ~~~~~ | |
| mutations | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2666:1: note: the definition seen here | |
| tsk_mutation_table_truncate(tsk_mutation_table_t *mutations, tsk_size_t num_rows) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1574:5: note: differing parameters are named here: ('self'), in definition: ('mutations') | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1659:5: warning: function 'tsk_mutation_table_set_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_set_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2609:1: note: the definition seen here | |
| tsk_mutation_table_set_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1659:5: note: differing parameters are named here: ('derived_state_length', 'metadata_length'), in definition: ('derived_state_offset', 'metadata_offset') | |
| int tsk_mutation_table_set_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1662:5: warning: function 'tsk_mutation_table_append_columns' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_append_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2505:1: note: the definition seen here | |
| tsk_mutation_table_append_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1662:5: note: differing parameters are named here: ('derived_state_length', 'metadata_length'), in definition: ('derived_state_offset', 'metadata_offset') | |
| int tsk_mutation_table_append_columns(tsk_mutation_table_t *self, tsk_size_t num_rows, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1667:5: warning: function 'tsk_mutation_table_truncate' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ ~~~~~ | |
| mutations | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:2666:1: note: the definition seen here | |
| tsk_mutation_table_truncate(tsk_mutation_table_t *mutations, tsk_size_t num_rows) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1667:5: note: differing parameters are named here: ('self'), in definition: ('mutations') | |
| int tsk_mutation_table_truncate(tsk_mutation_table_t *self, tsk_size_t num_rows); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1695:5: warning: function 'tsk_population_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_population_table_init(tsk_population_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3434:1: note: the definition seen here | |
| tsk_population_table_init(tsk_population_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1695:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_population_table_init(tsk_population_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1854:5: warning: function 'tsk_provenance_table_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_provenance_table_init(tsk_provenance_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:3882:1: note: the definition seen here | |
| tsk_provenance_table_init(tsk_provenance_table_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:1854:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_provenance_table_init(tsk_provenance_table_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2018:5: warning: function 'tsk_table_collection_init' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_init(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6695:1: note: the definition seen here | |
| tsk_table_collection_init(tsk_table_collection_t *self, tsk_flags_t TSK_UNUSED(options)) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2018:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_init(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2189:5: warning: function 'tsk_table_collection_record_num_rows' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_record_num_rows( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7541:1: note: the definition seen here | |
| tsk_table_collection_record_num_rows( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2189:5: note: differing parameters are named here: ('bookmark'), in definition: ('position') | |
| int tsk_table_collection_record_num_rows( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2206:5: warning: function 'tsk_table_collection_truncate' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_truncate( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7556:1: note: the definition seen here | |
| tsk_table_collection_truncate(tsk_table_collection_t *tables, tsk_bookmark_t *position) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2206:5: note: differing parameters are named here: ('self', 'bookmark'), in definition: ('tables', 'position') | |
| int tsk_table_collection_truncate( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2327:6: warning: function 'tsk_table_collection_has_index' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| bool tsk_table_collection_has_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6794:1: note: the definition seen here | |
| tsk_table_collection_has_index( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2327:6: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| bool tsk_table_collection_has_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2342:5: warning: function 'tsk_table_collection_drop_index' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_drop_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6802:1: note: the definition seen here | |
| tsk_table_collection_drop_index( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2342:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_drop_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2357:5: warning: function 'tsk_table_collection_build_index' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_build_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:6813:1: note: the definition seen here | |
| tsk_table_collection_build_index( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2357:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_build_index(tsk_table_collection_t *self, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2362:5: warning: function 'tsk_table_collection_link_ancestors' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_link_ancestors(tsk_table_collection_t *self, tsk_id_t *samples, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7289:1: note: the definition seen here | |
| tsk_table_collection_link_ancestors(tsk_table_collection_t *self, tsk_id_t *samples, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2362:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_link_ancestors(tsk_table_collection_t *self, tsk_id_t *samples, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2366:5: warning: function 'tsk_table_collection_deduplicate_sites' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_deduplicate_sites( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7354:1: note: the definition seen here | |
| tsk_table_collection_deduplicate_sites( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2366:5: note: differing parameters are named here: ('tables', 'options'), in definition: ('self', 'TSK_UNUSED_options') | |
| int tsk_table_collection_deduplicate_sites( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2368:5: warning: function 'tsk_table_collection_compute_mutation_parents' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_table_collection_compute_mutation_parents( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.c:7426:1: note: the definition seen here | |
| tsk_table_collection_compute_mutation_parents( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:2368:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_table_collection_compute_mutation_parents( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:181:18: warning: Result of 'calloc' is converted to a pointer of type 'tsk_size_t', which is incompatible with sizeof operand type 'size_t' [clang-analyzer-unix.MallocSizeof] | |
| node_count = calloc(TSK_MAX(1, num_inds), sizeof(size_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:181:18: note: Result of 'calloc' is converted to a pointer of type 'tsk_size_t', which is incompatible with sizeof operand type 'size_t' | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:197:11: warning: Result of 'malloc' is converted to a pointer of type 'tsk_id_t', which is incompatible with sizeof operand type 'tsk_node_t' [clang-analyzer-unix.MallocSizeof] | |
| = malloc(TSK_MAX(1, total_node_refs) * sizeof(tsk_node_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:197:11: note: Result of 'malloc' is converted to a pointer of type 'tsk_id_t', which is incompatible with sizeof operand type 'tsk_node_t' | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:198:30: warning: Result of 'malloc' is converted to a pointer of type 'tsk_id_t *', which is incompatible with sizeof operand type 'tsk_node_t *' [clang-analyzer-unix.MallocSizeof] | |
| self->individual_nodes = malloc(TSK_MAX(1, num_inds) * sizeof(tsk_node_t *)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:198:30: note: Result of 'malloc' is converted to a pointer of type 'tsk_id_t *', which is incompatible with sizeof operand type 'tsk_node_t *' | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:243:5: warning: Value stored to 'tree_right' is never read [clang-analyzer-deadcode.DeadStores] | |
| tree_right = sequence_length; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:243:5: note: Value stored to 'tree_right' is never read | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:331:21: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| self->samples = malloc(self->num_samples * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2995:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2995:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3000:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3000:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3003:11: note: Calling 'tsk_treeseq_init' | |
| ret = tsk_treeseq_init(output, &tables, TSK_BUILD_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:368:5: note: Taking false branch | |
| if (tables == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:373:9: note: Assuming the condition is false | |
| if (self->tables == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:373:5: note: Taking false branch | |
| if (self->tables == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:378:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:378:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:381:5: note: Taking true branch | |
| if (!!(options & TSK_BUILD_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:383:13: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:383:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:388:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:388:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:400:9: note: Assuming the condition is false | |
| if (tables->file_uuid != NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:400:5: note: Taking false branch | |
| if (tables->file_uuid != NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:409:11: note: Calling 'tsk_treeseq_init_nodes' | |
| ret = tsk_treeseq_init_nodes(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:325:17: note: Assuming 'j' is >= 'num_nodes' | |
| for (j = 0; j < num_nodes; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:325:5: note: Loop condition is false. Execution continues on line 331 | |
| for (j = 0; j < num_nodes; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:331:21: note: Call to 'malloc' has an allocation size of 0 bytes | |
| self->samples = malloc(self->num_samples * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:381:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_BUILD_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:381:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_BUILD_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:648:28: note: expanded from macro 'TSK_BUILD_INDEXES' | |
| #define TSK_BUILD_INDEXES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:387:62: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(self->tables, TSK_CHECK_ALL); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:642:39: note: expanded from macro 'TSK_CHECK_ALL' | |
| | TSK_CHECK_SITE_DUPLICATES | TSK_CHECK_MUTATION_ORDERING | TSK_CHECK_INDEXES) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:638:38: note: expanded from macro 'TSK_CHECK_MUTATION_ORDERING' | |
| #define TSK_CHECK_MUTATION_ORDERING (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:573:42: warning: macro argument should be enclosed in parentheses [misc-macro-parentheses] | |
| #define GET_2D_ROW(array, row_len, row) (array + (((size_t)(row_len)) * (size_t) row)) | |
| ^~~~~ | |
| () | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:573:82: warning: macro argument should be enclosed in parentheses [misc-macro-parentheses] | |
| #define GET_2D_ROW(array, row_len, row) (array + (((size_t)(row_len)) * (size_t) row)) | |
| ^~~~ | |
| () | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:604:76: warning: pointer parameter 'focal' can be pointer to const [readability-non-const-parameter] | |
| tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:605:58: warning: pointer parameter 'reference_set_size' can be pointer to const [readability-non-const-parameter] | |
| size_t num_focal, tsk_id_t **reference_sets, size_t *reference_set_size, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:787:13: warning: pointer parameter 'reference_set_size' can be pointer to const [readability-non-const-parameter] | |
| size_t *reference_set_size, size_t num_reference_sets, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:952:76: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| tsk_treeseq_check_windows(tsk_treeseq_t *self, size_t num_windows, double *windows) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1018:33: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| size_t num_windows, double *windows, double *result, tsk_flags_t TSK_UNUSED(options)) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1299:33: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| size_t num_windows, double *windows, double *result, tsk_flags_t options) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1329:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_POLARISED) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1329:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_POLARISED) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1419:57: warning: pointer parameter 'source' can be pointer to const [readability-non-const-parameter] | |
| increment_row(size_t length, double multiplier, double *source, double *dest) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1431:33: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| size_t num_windows, double *windows, double *result, tsk_flags_t TSK_UNUSED(options)) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1559:44: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| span_normalise(size_t num_windows, double *windows, size_t row_size, double *array) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1622:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1622:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:50:38: note: expanded from macro 'TSK_STAT_BRANCH' | |
| #define TSK_STAT_BRANCH (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1623:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = options & TSK_STAT_POLARISED; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1623:32: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = options & TSK_STAT_POLARISED; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1648:40: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] | |
| upargs.total_weight[k] += weight_u[k]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2347:27: note: Storing uninitialized value | |
| double *new_weights = malloc((num_weights + 1) * num_samples * sizeof(double)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:9: note: Assuming 'new_weights' is not equal to NULL | |
| if (new_weights == NULL || means == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:32: note: Assuming 'means' is not equal to NULL | |
| if (new_weights == NULL || means == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:5: note: Taking false branch | |
| if (new_weights == NULL || means == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2356:17: note: Assuming 'j' is >= 'num_samples' | |
| for (j = 0; j < num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2356:5: note: Loop condition is false. Execution continues on line 2362 | |
| for (j = 0; j < num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2362:5: note: Loop condition is true. Entering loop body | |
| for (k = 0; k < num_weights; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2362:17: note: Assuming 'k' is >= 'num_weights' | |
| for (k = 0; k < num_weights; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2362:5: note: Loop condition is false. Execution continues on line 2365 | |
| for (k = 0; k < num_weights; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2365:5: note: Loop condition is false. Execution continues on line 2373 | |
| for (j = 0; j < num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2373:11: note: Calling 'tsk_treeseq_general_stat' | |
| ret = tsk_treeseq_general_stat(self, num_weights, new_weights, num_weights, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1677:23: note: Assuming the condition is true | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1678:25: note: Assuming the condition is false | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1679:23: note: Assuming the condition is true | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1684:11: note: Left side of '||' is false | |
| if (!(stat_site || stat_branch || stat_node)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1684:36: note: Left side of '||' is true | |
| if (!(stat_site || stat_branch || stat_node)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1684:5: note: Taking false branch | |
| if (!(stat_site || stat_branch || stat_node)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1688:5: note: Taking false branch | |
| if (stat_site + stat_branch + stat_node > 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1693:5: note: Taking false branch | |
| if (state_dim < 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1697:5: note: Taking false branch | |
| if (result_dim < 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1701:9: note: Assuming 'windows' is not equal to NULL | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1701:5: note: Taking false branch | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1706:13: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1706:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1711:5: note: Taking false branch | |
| if (stat_site) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1715:15: note: Calling 'tsk_polarisable_func_general_stat' | |
| ret = tsk_polarisable_func_general_stat(self, state_dim, sample_weights, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1631:9: note: Assuming 'polarised' is 0 | |
| if (!polarised) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1631:5: note: Taking true branch | |
| if (!polarised) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:13: note: Assuming the condition is false | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:44: note: Assuming the condition is false | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:13: note: Left side of '||' is false | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1639:16: note: Assuming the condition is false | |
| || upargs.result_tmp == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:9: note: Taking false branch | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1645:21: note: Assuming the condition is true | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1645:9: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1647:13: note: Loop condition is true. Entering loop body | |
| for (k = 0; k < state_dim; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1648:40: note: Assigned value is garbage or undefined | |
| upargs.total_weight[k] += weight_u[k]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1677:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1677:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:49:38: note: expanded from macro 'TSK_STAT_SITE' | |
| #define TSK_STAT_SITE (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1678:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1678:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:50:38: note: expanded from macro 'TSK_STAT_BRANCH' | |
| #define TSK_STAT_BRANCH (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1679:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1679:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:51:38: note: expanded from macro 'TSK_STAT_NODE' | |
| #define TSK_STAT_NODE (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1719:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1719:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:55:38: note: expanded from macro 'TSK_STAT_SPAN_NORMALISE' | |
| #define TSK_STAT_SPAN_NORMALISE (1 << 11) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1732:78: warning: pointer parameter 'set_indexes' can be pointer to const [readability-non-const-parameter] | |
| check_set_indexes(tsk_size_t num_sets, tsk_size_t num_set_indexes, tsk_id_t *set_indexes) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1749:17: warning: pointer parameter 'sample_set_sizes' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t *sample_set_sizes, tsk_id_t *sample_sets) | |
| ~~~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1749:45: warning: pointer parameter 'sample_sets' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t *sample_set_sizes, tsk_id_t *sample_sets) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1804:15: warning: pointer parameter 'set_indexes' can be pointer to const [readability-non-const-parameter] | |
| tsk_id_t *set_indexes, general_stat_func_t *f, tsk_size_t num_windows, | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1891:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| tsk_size_t *coordinate = malloc(num_sample_sets * sizeof(*coordinate)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2201:23: note: Assuming the condition is false | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2202:25: note: Assuming the condition is true | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2203:23: note: Assuming the condition is true | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2215:5: note: Taking false branch | |
| if (stat_node) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2220:21: note: Left side of '||' is true | |
| if (!(stat_site || stat_branch)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2220:5: note: Taking false branch | |
| if (!(stat_site || stat_branch)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2224:5: note: Taking false branch | |
| if (stat_site + stat_branch > 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2228:9: note: Assuming 'windows' is not equal to NULL | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2228:5: note: Taking false branch | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2233:13: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2233:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2239:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2239:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:9: note: Assuming 'counts' is not equal to NULL | |
| if (counts == NULL || result_dims == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:27: note: Assuming 'result_dims' is not equal to NULL | |
| if (counts == NULL || result_dims == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:5: note: Taking false branch | |
| if (counts == NULL || result_dims == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2252:17: note: Assuming 'k' is >= 'num_sample_sets' | |
| for (k = 0; k < num_sample_sets; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2252:5: note: Loop condition is false. Execution continues on line 2266 | |
| for (k = 0; k < num_sample_sets; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2266:17: note: Assuming the condition is false | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2266:5: note: Loop condition is false. Execution continues on line 2271 | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2274:5: note: Taking true branch | |
| if (stat_site) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2275:15: note: Calling 'tsk_treeseq_site_allele_frequency_spectrum' | |
| ret = tsk_treeseq_site_allele_frequency_spectrum(self, num_sample_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:9: note: Assuming 'parent' is not equal to NULL | |
| if (parent == NULL || total_counts == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:27: note: Assuming 'total_counts' is not equal to NULL | |
| if (parent == NULL || total_counts == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:5: note: Taking false branch | |
| if (parent == NULL || total_counts == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1962:5: note: Loop condition is false. Execution continues on line 1965 | |
| for (j = 0; j < num_sample_sets; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1973:12: note: Assuming 'tj' is >= 'num_edges' | |
| while (tj < num_edges || t_left < sequence_length) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1973:12: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1973:5: note: Loop condition is true. Entering loop body | |
| while (tj < num_edges || t_left < sequence_length) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1974:31: note: Left side of '&&' is false | |
| while (tk < num_edges && edge_right[O[tk]] == t_left) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1986:31: note: Left side of '&&' is false | |
| while (tj < num_edges && edge_left[I[tj]] == t_left) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1998:9: note: Taking false branch | |
| if (tj < num_edges) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2001:9: note: Taking false branch | |
| if (tk < num_edges) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2006:29: note: Assuming the condition is true | |
| for (tree_site = 0; tree_site < self->tree_sites_length[tree_index]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2006:9: note: Loop condition is true. Entering loop body | |
| for (tree_site = 0; tree_site < self->tree_sites_length[tree_index]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2009:13: note: Loop condition is false. Execution continues on line 2013 | |
| while (windows[window_index + 1] <= site->position) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2013:19: note: Calling 'tsk_treeseq_update_site_afs' | |
| ret = tsk_treeseq_update_site_afs(self, site, total_counts, counts, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1891:30: note: Call to 'malloc' has an allocation size of 0 bytes | |
| tsk_size_t *coordinate = malloc(num_sample_sets * sizeof(*coordinate)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1892:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1892:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1933:37: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t num_windows, double *windows, tsk_size_t *result_dims, double *result, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2044:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2044:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2076:81: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t num_sample_sets, double *counts, tsk_size_t num_windows, double *windows, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2201:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2201:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:49:38: note: expanded from macro 'TSK_STAT_SITE' | |
| #define TSK_STAT_SITE (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2202:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2202:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:50:38: note: expanded from macro 'TSK_STAT_BRANCH' | |
| #define TSK_STAT_BRANCH (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2203:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2203:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:51:38: note: expanded from macro 'TSK_STAT_NODE' | |
| #define TSK_STAT_NODE (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2283:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2283:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:55:38: note: expanded from macro 'TSK_STAT_SPAN_NORMALISE' | |
| #define TSK_STAT_SPAN_NORMALISE (1 << 11) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2297:50: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| diversity_summary_func(size_t state_dim, double *state, size_t TSK_UNUSED(result_dim), | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2323:57: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| trait_covariance_summary_func(size_t state_dim, double *state, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2383:58: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| trait_correlation_summary_func(size_t state_dim, double *state, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2465:31: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| size_t state_dim, double *state, size_t result_dim, double *result, void *params) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2577:58: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| segregating_sites_summary_func(size_t state_dim, double *state, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2604:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| Y1_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2659:63: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| divergence_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2698:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| Y2_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2737:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| f2_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2782:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| Y3_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2824:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| f3_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2871:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| f4_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3003:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_treeseq_init(output, &tables, TSK_BUILD_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:648:28: note: expanded from macro 'TSK_BUILD_INDEXES' | |
| #define TSK_BUILD_INDEXES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3021:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_counts = !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3021:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_counts = !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3022:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_lists = !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3022:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_lists = !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:9: warning: Potential memory leak [clang-analyzer-unix.Malloc] | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3108:25: note: Memory is allocated | |
| self->right_child = malloc(num_nodes * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:9: note: Potential memory leak | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:45:38: note: expanded from macro 'TSK_SAMPLE_COUNTS' | |
| #define TSK_SAMPLE_COUNTS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3134:29: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| self->next_sample = malloc(num_samples * sizeof(*self->next_sample)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3134:29: note: Call to 'malloc' has an allocation size of 0 bytes | |
| self->next_sample = malloc(num_samples * sizeof(*self->next_sample)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3193:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3193:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3199:14: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3199:30: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3218:61: warning: pointer parameter 'tracked_samples' can be pointer to const [readability-non-const-parameter] | |
| tsk_tree_t *self, size_t num_tracked_samples, tsk_id_t *tracked_samples) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3303:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3329:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(dest->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3329:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(dest->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3330:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3330:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3339:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (dest->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3339:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (dest->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3340:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_SAMPLE_LISTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3340:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_SAMPLE_LISTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3478:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3478:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3497:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3497:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3669:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3669:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3681:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3681:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3709:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3709:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3718:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3718:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3721:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3721:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3808:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3808:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3852:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3852:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: warning: Potential leak of memory pointed to by 'left_child' [clang-analyzer-unix.Malloc] | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3107:24: note: Memory is allocated | |
| self->left_child = malloc(num_nodes * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is false. Execution continues on line 4935 | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4939:5: note: Taking false branch | |
| if (ret != 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4943:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4950:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4953:19: note: Calling 'tsk_tree_next' | |
| while ((ret = tsk_tree_next(&trees[1])) == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4122:5: note: Taking true branch | |
| if (self->index == -1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4123:15: note: Calling 'tsk_tree_first' | |
| ret = tsk_tree_first(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:9: note: Assuming the condition is true | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:5: note: Taking true branch | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4060:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4069:15: note: Calling 'tsk_tree_advance' | |
| ret = tsk_tree_advance(self, TSK_DIR_FORWARD, tables->edges.right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3978:5: note: Taking true branch | |
| if (direction == TSK_DIR_FORWARD) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:5: note: Loop condition is false. Execution continues on line 3993 | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:5: note: Loop condition is true. Entering loop body | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3996:15: note: Calling 'tsk_tree_insert_edge' | |
| ret = tsk_tree_insert_edge(self, edge_parent[k], edge_child[k]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3878:5: note: Taking false branch | |
| if (parent[c] != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:9: note: Assuming the condition is false | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:5: note: Taking false branch | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:16: note: Assuming the condition is false | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:9: note: Loop condition is false. Execution continues on line 3913 | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3913:9: note: Taking false branch | |
| if (IS_ROOT(c)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3938:35: note: Left side of '&&' is false | |
| if (IS_ROOT(path_end) && !path_end_was_root) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: note: Potential leak of memory pointed to by 'left_child' | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: warning: Potential leak of memory pointed to by 'parent' [clang-analyzer-unix.Malloc] | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3106:20: note: Memory is allocated | |
| self->parent = malloc(num_nodes * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is false. Execution continues on line 4935 | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4939:5: note: Taking false branch | |
| if (ret != 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4943:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4950:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4953:19: note: Calling 'tsk_tree_next' | |
| while ((ret = tsk_tree_next(&trees[1])) == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4122:5: note: Taking true branch | |
| if (self->index == -1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4123:15: note: Calling 'tsk_tree_first' | |
| ret = tsk_tree_first(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:9: note: Assuming the condition is true | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:5: note: Taking true branch | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4060:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4069:15: note: Calling 'tsk_tree_advance' | |
| ret = tsk_tree_advance(self, TSK_DIR_FORWARD, tables->edges.right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3978:5: note: Taking true branch | |
| if (direction == TSK_DIR_FORWARD) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:5: note: Loop condition is false. Execution continues on line 3993 | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:5: note: Loop condition is true. Entering loop body | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3996:15: note: Calling 'tsk_tree_insert_edge' | |
| ret = tsk_tree_insert_edge(self, edge_parent[k], edge_child[k]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3878:5: note: Taking false branch | |
| if (parent[c] != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:9: note: Assuming the condition is false | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:5: note: Taking false branch | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:16: note: Assuming the condition is false | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:9: note: Loop condition is false. Execution continues on line 3913 | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3913:9: note: Taking false branch | |
| if (IS_ROOT(c)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3938:35: note: Left side of '&&' is false | |
| if (IS_ROOT(path_end) && !path_end_was_root) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: note: Potential leak of memory pointed to by 'parent' | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: warning: Potential leak of memory pointed to by 'right_sib' [clang-analyzer-unix.Malloc] | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3110:23: note: Memory is allocated | |
| self->right_sib = malloc(num_nodes * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is false. Execution continues on line 4935 | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4939:5: note: Taking false branch | |
| if (ret != 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4943:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4950:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4953:19: note: Calling 'tsk_tree_next' | |
| while ((ret = tsk_tree_next(&trees[1])) == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4122:5: note: Taking true branch | |
| if (self->index == -1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4123:15: note: Calling 'tsk_tree_first' | |
| ret = tsk_tree_first(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:9: note: Assuming the condition is true | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:5: note: Taking true branch | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4060:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4069:15: note: Calling 'tsk_tree_advance' | |
| ret = tsk_tree_advance(self, TSK_DIR_FORWARD, tables->edges.right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3978:5: note: Taking true branch | |
| if (direction == TSK_DIR_FORWARD) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:5: note: Loop condition is false. Execution continues on line 3993 | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:5: note: Loop condition is true. Entering loop body | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3996:15: note: Calling 'tsk_tree_insert_edge' | |
| ret = tsk_tree_insert_edge(self, edge_parent[k], edge_child[k]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3878:5: note: Taking false branch | |
| if (parent[c] != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:9: note: Assuming the condition is false | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:5: note: Taking false branch | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:16: note: Assuming the condition is false | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:9: note: Loop condition is false. Execution continues on line 3913 | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3913:9: note: Taking false branch | |
| if (IS_ROOT(c)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3938:35: note: Left side of '&&' is false | |
| if (IS_ROOT(path_end) && !path_end_was_root) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: note: Potential leak of memory pointed to by 'right_sib' | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4157:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return value | (1ULL << bit); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4163:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return (value & (1ULL << bit)) != 0; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4348:23: warning: Potential memory leak [clang-analyzer-unix.Malloc] | |
| self->num_nodes = tsk_treeseq_get_num_nodes(tree_sequence); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4925:15: note: Calling 'tsk_diff_iter_init' | |
| ret = tsk_diff_iter_init(&diff_iters[i], treeseqs[i]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4355:29: note: Memory is allocated | |
| self->edge_list_nodes = malloc(self->num_edges * sizeof(*self->edge_list_nodes)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4356:9: note: Assuming the condition is false | |
| if (self->edge_list_nodes == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4356:5: note: Taking false branch | |
| if (self->edge_list_nodes == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4925:15: note: Returned allocated memory | |
| ret = tsk_diff_iter_init(&diff_iters[i], treeseqs[i]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4925:15: note: Calling 'tsk_diff_iter_init' | |
| ret = tsk_diff_iter_init(&diff_iters[i], treeseqs[i]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4348:23: note: Potential memory leak | |
| self->num_nodes = tsk_treeseq_get_num_nodes(tree_sequence); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4506:22: warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [misc-misplaced-widening-cast] | |
| self->m = calloc((size_t)(self->N + self->n), sizeof(tsk_size_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4507:22: warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [misc-misplaced-widening-cast] | |
| self->M = calloc((size_t)(self->N + self->n), sizeof(double)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4826:17: warning: redundant cast to the same type [google-readability-casting] | |
| depth = (tsk_size_t) stack[stack_top].depth; | |
| ^~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:53: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:225:5: warning: function 'tsk_treeseq_load' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_load(tsk_treeseq_t *self, const char *filename, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:437:1: note: the definition seen here | |
| tsk_treeseq_load( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:225:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_treeseq_load(tsk_treeseq_t *self, const char *filename, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:275:5: warning: function 'tsk_treeseq_genealogical_nearest_neighbours' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:604:1: note: the definition seen here | |
| tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:275:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:278:5: warning: function 'tsk_treeseq_mean_descendants' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_mean_descendants(tsk_treeseq_t *self, tsk_id_t **reference_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:786:1: note: the definition seen here | |
| tsk_treeseq_mean_descendants(tsk_treeseq_t *self, tsk_id_t **reference_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:278:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_treeseq_mean_descendants(tsk_treeseq_t *self, tsk_id_t **reference_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:286:5: warning: function 'tsk_treeseq_general_stat' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_general_stat(tsk_treeseq_t *self, size_t K, double *W, size_t M, | |
| ^ ~~ ~~ ~~ | |
| state_dim sample_weights result_dim | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1672:1: note: the definition seen here | |
| tsk_treeseq_general_stat(tsk_treeseq_t *self, size_t state_dim, double *sample_weights, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:286:5: note: differing parameters are named here: ('K', 'W', 'M', 'sigma'), in definition: ('state_dim', 'sample_weights', 'result_dim', 'result') | |
| int tsk_treeseq_general_stat(tsk_treeseq_t *self, size_t K, double *W, size_t M, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:393:5: warning: function 'tsk_tree_depth' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_tree_depth(tsk_tree_t *self, tsk_id_t u, tsk_size_t *depth); | |
| ^ ~~~~~~ | |
| depth_ret | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3584:1: note: the definition seen here | |
| tsk_tree_depth(tsk_tree_t *self, tsk_id_t u, tsk_size_t *depth_ret) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:393:5: note: differing parameters are named here: ('depth'), in definition: ('depth_ret') | |
| int tsk_tree_depth(tsk_tree_t *self, tsk_id_t u, tsk_size_t *depth); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:401:5: warning: function 'tsk_tree_map_mutations' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_tree_map_mutations(tsk_tree_t *self, int8_t *genotypes, double *cost_matrix, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4188:1: note: the definition seen here | |
| tsk_tree_map_mutations(tsk_tree_t *self, int8_t *genotypes, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:401:5: note: differing parameters are named here: ('cost_matrix', 'options', 'ancestral_state', 'num_transitions', 'transitions'), in definition: ('TSK_UNUSED_cost_matrix', 'TSK_UNUSED_options', 'r_ancestral_state', 'r_num_transitions', 'r_transitions') | |
| int tsk_tree_map_mutations(tsk_tree_t *self, int8_t *genotypes, double *cost_matrix, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:414:5: warning: function 'tsk_diff_iter_next' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_diff_iter_next(tsk_diff_iter_t *self, double *left, double *right, | |
| ^ ~~~~~ ~~~~~~ | |
| ret_left ret_right | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4383:1: note: the definition seen here | |
| tsk_diff_iter_next(tsk_diff_iter_t *self, double *ret_left, double *ret_right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:414:5: note: differing parameters are named here: ('left', 'right', 'edges_out', 'edges_in'), in definition: ('ret_left', 'ret_right', 'edges_out_ret', 'edges_in_ret') | |
| int tsk_diff_iter_next(tsk_diff_iter_t *self, double *left, double *right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:26:1: warning: #includes are not sorted properly [llvm-include-order] | |
| #include <stdio.h> | |
| ^ ~~~~~~~~~ | |
| <assert.h> | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:181:18: warning: Result of 'calloc' is converted to a pointer of type 'tsk_size_t', which is incompatible with sizeof operand type 'size_t' [clang-analyzer-unix.MallocSizeof] | |
| node_count = calloc(TSK_MAX(1, num_inds), sizeof(size_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:181:18: note: Result of 'calloc' is converted to a pointer of type 'tsk_size_t', which is incompatible with sizeof operand type 'size_t' | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:197:11: warning: Result of 'malloc' is converted to a pointer of type 'tsk_id_t', which is incompatible with sizeof operand type 'tsk_node_t' [clang-analyzer-unix.MallocSizeof] | |
| = malloc(TSK_MAX(1, total_node_refs) * sizeof(tsk_node_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:197:11: note: Result of 'malloc' is converted to a pointer of type 'tsk_id_t', which is incompatible with sizeof operand type 'tsk_node_t' | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:198:30: warning: Result of 'malloc' is converted to a pointer of type 'tsk_id_t *', which is incompatible with sizeof operand type 'tsk_node_t *' [clang-analyzer-unix.MallocSizeof] | |
| self->individual_nodes = malloc(TSK_MAX(1, num_inds) * sizeof(tsk_node_t *)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:198:30: note: Result of 'malloc' is converted to a pointer of type 'tsk_id_t *', which is incompatible with sizeof operand type 'tsk_node_t *' | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:243:5: warning: Value stored to 'tree_right' is never read [clang-analyzer-deadcode.DeadStores] | |
| tree_right = sequence_length; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:243:5: note: Value stored to 'tree_right' is never read | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:331:21: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| self->samples = malloc(self->num_samples * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2995:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2995:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3000:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3000:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3003:11: note: Calling 'tsk_treeseq_init' | |
| ret = tsk_treeseq_init(output, &tables, TSK_BUILD_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:368:5: note: Taking false branch | |
| if (tables == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:373:9: note: Assuming the condition is false | |
| if (self->tables == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:373:5: note: Taking false branch | |
| if (self->tables == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:378:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:378:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:381:5: note: Taking true branch | |
| if (!!(options & TSK_BUILD_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:383:13: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:383:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:388:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:388:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:400:9: note: Assuming the condition is false | |
| if (tables->file_uuid != NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:400:5: note: Taking false branch | |
| if (tables->file_uuid != NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:409:11: note: Calling 'tsk_treeseq_init_nodes' | |
| ret = tsk_treeseq_init_nodes(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:325:17: note: Assuming 'j' is >= 'num_nodes' | |
| for (j = 0; j < num_nodes; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:325:5: note: Loop condition is false. Execution continues on line 331 | |
| for (j = 0; j < num_nodes; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:331:21: note: Call to 'malloc' has an allocation size of 0 bytes | |
| self->samples = malloc(self->num_samples * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:381:12: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_BUILD_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:381:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!!(options & TSK_BUILD_INDEXES)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:648:28: note: expanded from macro 'TSK_BUILD_INDEXES' | |
| #define TSK_BUILD_INDEXES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:387:62: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_table_collection_check_integrity(self->tables, TSK_CHECK_ALL); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:642:39: note: expanded from macro 'TSK_CHECK_ALL' | |
| | TSK_CHECK_SITE_DUPLICATES | TSK_CHECK_MUTATION_ORDERING | TSK_CHECK_INDEXES) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:638:38: note: expanded from macro 'TSK_CHECK_MUTATION_ORDERING' | |
| #define TSK_CHECK_MUTATION_ORDERING (1 << 4) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:573:42: warning: macro argument should be enclosed in parentheses [misc-macro-parentheses] | |
| #define GET_2D_ROW(array, row_len, row) (array + (((size_t)(row_len)) * (size_t) row)) | |
| ^~~~~ | |
| () | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:573:82: warning: macro argument should be enclosed in parentheses [misc-macro-parentheses] | |
| #define GET_2D_ROW(array, row_len, row) (array + (((size_t)(row_len)) * (size_t) row)) | |
| ^~~~ | |
| () | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:604:76: warning: pointer parameter 'focal' can be pointer to const [readability-non-const-parameter] | |
| tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:605:58: warning: pointer parameter 'reference_set_size' can be pointer to const [readability-non-const-parameter] | |
| size_t num_focal, tsk_id_t **reference_sets, size_t *reference_set_size, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:787:13: warning: pointer parameter 'reference_set_size' can be pointer to const [readability-non-const-parameter] | |
| size_t *reference_set_size, size_t num_reference_sets, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:952:76: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| tsk_treeseq_check_windows(tsk_treeseq_t *self, size_t num_windows, double *windows) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1018:33: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| size_t num_windows, double *windows, double *result, tsk_flags_t TSK_UNUSED(options)) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1299:33: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| size_t num_windows, double *windows, double *result, tsk_flags_t options) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1329:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_POLARISED) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1329:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_POLARISED) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1419:57: warning: pointer parameter 'source' can be pointer to const [readability-non-const-parameter] | |
| increment_row(size_t length, double multiplier, double *source, double *dest) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1431:33: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| size_t num_windows, double *windows, double *result, tsk_flags_t TSK_UNUSED(options)) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1559:44: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| span_normalise(size_t num_windows, double *windows, size_t row_size, double *array) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1622:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1622:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:50:38: note: expanded from macro 'TSK_STAT_BRANCH' | |
| #define TSK_STAT_BRANCH (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1623:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = options & TSK_STAT_POLARISED; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1623:32: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = options & TSK_STAT_POLARISED; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1648:40: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] | |
| upargs.total_weight[k] += weight_u[k]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2347:27: note: Storing uninitialized value | |
| double *new_weights = malloc((num_weights + 1) * num_samples * sizeof(double)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:9: note: Assuming 'new_weights' is not equal to NULL | |
| if (new_weights == NULL || means == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:32: note: Assuming 'means' is not equal to NULL | |
| if (new_weights == NULL || means == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2350:5: note: Taking false branch | |
| if (new_weights == NULL || means == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2356:17: note: Assuming 'j' is >= 'num_samples' | |
| for (j = 0; j < num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2356:5: note: Loop condition is false. Execution continues on line 2362 | |
| for (j = 0; j < num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2362:5: note: Loop condition is true. Entering loop body | |
| for (k = 0; k < num_weights; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2362:17: note: Assuming 'k' is >= 'num_weights' | |
| for (k = 0; k < num_weights; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2362:5: note: Loop condition is false. Execution continues on line 2365 | |
| for (k = 0; k < num_weights; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2365:5: note: Loop condition is false. Execution continues on line 2373 | |
| for (j = 0; j < num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2373:11: note: Calling 'tsk_treeseq_general_stat' | |
| ret = tsk_treeseq_general_stat(self, num_weights, new_weights, num_weights, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1677:23: note: Assuming the condition is true | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1678:25: note: Assuming the condition is false | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1679:23: note: Assuming the condition is true | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1684:11: note: Left side of '||' is false | |
| if (!(stat_site || stat_branch || stat_node)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1684:36: note: Left side of '||' is true | |
| if (!(stat_site || stat_branch || stat_node)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1684:5: note: Taking false branch | |
| if (!(stat_site || stat_branch || stat_node)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1688:5: note: Taking false branch | |
| if (stat_site + stat_branch + stat_node > 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1693:5: note: Taking false branch | |
| if (state_dim < 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1697:5: note: Taking false branch | |
| if (result_dim < 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1701:9: note: Assuming 'windows' is not equal to NULL | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1701:5: note: Taking false branch | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1706:13: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1706:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1711:5: note: Taking false branch | |
| if (stat_site) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1715:15: note: Calling 'tsk_polarisable_func_general_stat' | |
| ret = tsk_polarisable_func_general_stat(self, state_dim, sample_weights, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1631:9: note: Assuming 'polarised' is 0 | |
| if (!polarised) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1631:5: note: Taking true branch | |
| if (!polarised) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:13: note: Assuming the condition is false | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:44: note: Assuming the condition is false | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:13: note: Left side of '||' is false | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1639:16: note: Assuming the condition is false | |
| || upargs.result_tmp == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1638:9: note: Taking false branch | |
| if (upargs.total_weight == NULL || upargs.total_minus_state == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1645:21: note: Assuming the condition is true | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1645:9: note: Loop condition is true. Entering loop body | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1647:13: note: Loop condition is true. Entering loop body | |
| for (k = 0; k < state_dim; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1648:40: note: Assigned value is garbage or undefined | |
| upargs.total_weight[k] += weight_u[k]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1677:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1677:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:49:38: note: expanded from macro 'TSK_STAT_SITE' | |
| #define TSK_STAT_SITE (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1678:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1678:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:50:38: note: expanded from macro 'TSK_STAT_BRANCH' | |
| #define TSK_STAT_BRANCH (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1679:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1679:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:51:38: note: expanded from macro 'TSK_STAT_NODE' | |
| #define TSK_STAT_NODE (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1719:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1719:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:55:38: note: expanded from macro 'TSK_STAT_SPAN_NORMALISE' | |
| #define TSK_STAT_SPAN_NORMALISE (1 << 11) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1732:78: warning: pointer parameter 'set_indexes' can be pointer to const [readability-non-const-parameter] | |
| check_set_indexes(tsk_size_t num_sets, tsk_size_t num_set_indexes, tsk_id_t *set_indexes) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1749:17: warning: pointer parameter 'sample_set_sizes' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t *sample_set_sizes, tsk_id_t *sample_sets) | |
| ~~~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1749:45: warning: pointer parameter 'sample_sets' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t *sample_set_sizes, tsk_id_t *sample_sets) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1804:15: warning: pointer parameter 'set_indexes' can be pointer to const [readability-non-const-parameter] | |
| tsk_id_t *set_indexes, general_stat_func_t *f, tsk_size_t num_windows, | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1891:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| tsk_size_t *coordinate = malloc(num_sample_sets * sizeof(*coordinate)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2201:23: note: Assuming the condition is false | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2202:25: note: Assuming the condition is true | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2203:23: note: Assuming the condition is true | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2215:5: note: Taking false branch | |
| if (stat_node) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2220:21: note: Left side of '||' is true | |
| if (!(stat_site || stat_branch)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2220:5: note: Taking false branch | |
| if (!(stat_site || stat_branch)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2224:5: note: Taking false branch | |
| if (stat_site + stat_branch > 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2228:9: note: Assuming 'windows' is not equal to NULL | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2228:5: note: Taking false branch | |
| if (windows == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2233:13: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2233:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2239:9: note: Assuming 'ret' is equal to 0 | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2239:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:9: note: Assuming 'counts' is not equal to NULL | |
| if (counts == NULL || result_dims == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:27: note: Assuming 'result_dims' is not equal to NULL | |
| if (counts == NULL || result_dims == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2246:5: note: Taking false branch | |
| if (counts == NULL || result_dims == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2252:17: note: Assuming 'k' is >= 'num_sample_sets' | |
| for (k = 0; k < num_sample_sets; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2252:5: note: Loop condition is false. Execution continues on line 2266 | |
| for (k = 0; k < num_sample_sets; k++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2266:17: note: Assuming the condition is false | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2266:5: note: Loop condition is false. Execution continues on line 2271 | |
| for (j = 0; j < self->num_samples; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2274:5: note: Taking true branch | |
| if (stat_site) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2275:15: note: Calling 'tsk_treeseq_site_allele_frequency_spectrum' | |
| ret = tsk_treeseq_site_allele_frequency_spectrum(self, num_sample_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:9: note: Assuming 'parent' is not equal to NULL | |
| if (parent == NULL || total_counts == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:27: note: Assuming 'total_counts' is not equal to NULL | |
| if (parent == NULL || total_counts == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1956:5: note: Taking false branch | |
| if (parent == NULL || total_counts == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1962:5: note: Loop condition is false. Execution continues on line 1965 | |
| for (j = 0; j < num_sample_sets; j++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1973:12: note: Assuming 'tj' is >= 'num_edges' | |
| while (tj < num_edges || t_left < sequence_length) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1973:12: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1973:5: note: Loop condition is true. Entering loop body | |
| while (tj < num_edges || t_left < sequence_length) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1974:31: note: Left side of '&&' is false | |
| while (tk < num_edges && edge_right[O[tk]] == t_left) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1986:31: note: Left side of '&&' is false | |
| while (tj < num_edges && edge_left[I[tj]] == t_left) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1998:9: note: Taking false branch | |
| if (tj < num_edges) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2001:9: note: Taking false branch | |
| if (tk < num_edges) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2006:29: note: Assuming the condition is true | |
| for (tree_site = 0; tree_site < self->tree_sites_length[tree_index]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2006:9: note: Loop condition is true. Entering loop body | |
| for (tree_site = 0; tree_site < self->tree_sites_length[tree_index]; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2009:13: note: Loop condition is false. Execution continues on line 2013 | |
| while (windows[window_index + 1] <= site->position) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2013:19: note: Calling 'tsk_treeseq_update_site_afs' | |
| ret = tsk_treeseq_update_site_afs(self, site, total_counts, counts, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1891:30: note: Call to 'malloc' has an allocation size of 0 bytes | |
| tsk_size_t *coordinate = malloc(num_sample_sets * sizeof(*coordinate)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1892:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1892:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1933:37: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t num_windows, double *windows, tsk_size_t *result_dims, double *result, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2044:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2044:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool polarised = !!(options & TSK_STAT_POLARISED); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:54:38: note: expanded from macro 'TSK_STAT_POLARISED' | |
| #define TSK_STAT_POLARISED (1 << 10) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2076:81: warning: pointer parameter 'windows' can be pointer to const [readability-non-const-parameter] | |
| tsk_size_t num_sample_sets, double *counts, tsk_size_t num_windows, double *windows, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2201:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2201:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_site = !!(options & TSK_STAT_SITE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:49:38: note: expanded from macro 'TSK_STAT_SITE' | |
| #define TSK_STAT_SITE (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2202:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2202:37: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_branch = !!(options & TSK_STAT_BRANCH); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:50:38: note: expanded from macro 'TSK_STAT_BRANCH' | |
| #define TSK_STAT_BRANCH (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2203:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2203:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| bool stat_node = !!(options & TSK_STAT_NODE); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:51:38: note: expanded from macro 'TSK_STAT_NODE' | |
| #define TSK_STAT_NODE (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2283:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2283:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_STAT_SPAN_NORMALISE) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:55:38: note: expanded from macro 'TSK_STAT_SPAN_NORMALISE' | |
| #define TSK_STAT_SPAN_NORMALISE (1 << 11) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2297:50: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| diversity_summary_func(size_t state_dim, double *state, size_t TSK_UNUSED(result_dim), | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2323:57: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| trait_covariance_summary_func(size_t state_dim, double *state, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2383:58: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| trait_correlation_summary_func(size_t state_dim, double *state, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2465:31: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| size_t state_dim, double *state, size_t result_dim, double *result, void *params) | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2577:58: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| segregating_sites_summary_func(size_t state_dim, double *state, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2604:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| Y1_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2659:63: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| divergence_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2698:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| Y2_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2737:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| f2_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2782:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| Y3_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2824:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| f3_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:2871:55: warning: pointer parameter 'state' can be pointer to const [readability-non-const-parameter] | |
| f4_summary_func(size_t TSK_UNUSED(state_dim), double *state, size_t result_dim, | |
| ~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3003:45: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_treeseq_init(output, &tables, TSK_BUILD_INDEXES); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:648:28: note: expanded from macro 'TSK_BUILD_INDEXES' | |
| #define TSK_BUILD_INDEXES (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3021:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_counts = !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3021:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_counts = !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3022:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_lists = !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3022:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| const bool sample_lists = !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:9: warning: Potential memory leak [clang-analyzer-unix.Malloc] | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3124:37: note: Memory is allocated | |
| self->num_tracked_samples = calloc(num_nodes, sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:9: note: Potential memory leak | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:45:38: note: expanded from macro 'TSK_SAMPLE_COUNTS' | |
| #define TSK_SAMPLE_COUNTS (1 << 0) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3134:29: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-unix.API] | |
| self->next_sample = malloc(num_samples * sizeof(*self->next_sample)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3134:29: note: Call to 'malloc' has an allocation size of 0 bytes | |
| self->next_sample = malloc(num_samples * sizeof(*self->next_sample)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3193:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3193:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !!(self->options & TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3199:14: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3199:30: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return !(self->options & TSK_NO_SAMPLE_COUNTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3218:61: warning: pointer parameter 'tracked_samples' can be pointer to const [readability-non-const-parameter] | |
| tsk_tree_t *self, size_t num_tracked_samples, tsk_id_t *tracked_samples) | |
| ~~~~~~~~ ^ | |
| const | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3303:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(options & TSK_NO_INIT)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/tables.h:622:22: note: expanded from macro 'TSK_NO_INIT' | |
| #define TSK_NO_INIT (1u << 30) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3329:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(dest->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3329:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(dest->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3330:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3330:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3339:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (dest->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3339:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (dest->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3340:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_SAMPLE_LISTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3340:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_SAMPLE_LISTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3478:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3478:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3497:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3497:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_NO_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3669:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3669:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3681:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3681:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3709:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3709:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3718:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3718:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3721:15: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3721:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3808:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3808:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3852:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3852:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:11: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:27: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:47:38: note: expanded from macro 'TSK_NO_SAMPLE_COUNTS' | |
| #define TSK_NO_SAMPLE_COUNTS (1 << 2) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:25: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: warning: Potential leak of memory pointed to by 'left_child' [clang-analyzer-unix.Malloc] | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3107:24: note: Memory is allocated | |
| self->left_child = malloc(num_nodes * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is false. Execution continues on line 4935 | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4939:5: note: Taking false branch | |
| if (ret != 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4943:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4950:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4953:19: note: Calling 'tsk_tree_next' | |
| while ((ret = tsk_tree_next(&trees[1])) == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4122:5: note: Taking true branch | |
| if (self->index == -1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4123:15: note: Calling 'tsk_tree_first' | |
| ret = tsk_tree_first(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:9: note: Assuming the condition is true | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:5: note: Taking true branch | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4060:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4069:15: note: Calling 'tsk_tree_advance' | |
| ret = tsk_tree_advance(self, TSK_DIR_FORWARD, tables->edges.right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3978:5: note: Taking true branch | |
| if (direction == TSK_DIR_FORWARD) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:5: note: Loop condition is false. Execution continues on line 3993 | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:5: note: Loop condition is true. Entering loop body | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3996:15: note: Calling 'tsk_tree_insert_edge' | |
| ret = tsk_tree_insert_edge(self, edge_parent[k], edge_child[k]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3878:5: note: Taking false branch | |
| if (parent[c] != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:9: note: Assuming the condition is false | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:5: note: Taking false branch | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:16: note: Assuming the condition is false | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:9: note: Loop condition is false. Execution continues on line 3913 | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3913:9: note: Taking false branch | |
| if (IS_ROOT(c)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3938:35: note: Left side of '&&' is false | |
| if (IS_ROOT(path_end) && !path_end_was_root) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: note: Potential leak of memory pointed to by 'left_child' | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: warning: Potential leak of memory pointed to by 'parent' [clang-analyzer-unix.Malloc] | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3106:20: note: Memory is allocated | |
| self->parent = malloc(num_nodes * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is false. Execution continues on line 4935 | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4939:5: note: Taking false branch | |
| if (ret != 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4943:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4950:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4953:19: note: Calling 'tsk_tree_next' | |
| while ((ret = tsk_tree_next(&trees[1])) == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4122:5: note: Taking true branch | |
| if (self->index == -1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4123:15: note: Calling 'tsk_tree_first' | |
| ret = tsk_tree_first(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:9: note: Assuming the condition is true | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:5: note: Taking true branch | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4060:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4069:15: note: Calling 'tsk_tree_advance' | |
| ret = tsk_tree_advance(self, TSK_DIR_FORWARD, tables->edges.right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3978:5: note: Taking true branch | |
| if (direction == TSK_DIR_FORWARD) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:5: note: Loop condition is false. Execution continues on line 3993 | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:5: note: Loop condition is true. Entering loop body | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3996:15: note: Calling 'tsk_tree_insert_edge' | |
| ret = tsk_tree_insert_edge(self, edge_parent[k], edge_child[k]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3878:5: note: Taking false branch | |
| if (parent[c] != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:9: note: Assuming the condition is false | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:5: note: Taking false branch | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:16: note: Assuming the condition is false | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:9: note: Loop condition is false. Execution continues on line 3913 | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3913:9: note: Taking false branch | |
| if (IS_ROOT(c)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3938:35: note: Left side of '&&' is false | |
| if (IS_ROOT(path_end) && !path_end_was_root) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: note: Potential leak of memory pointed to by 'parent' | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: warning: Potential leak of memory pointed to by 'right_sib' [clang-analyzer-unix.Malloc] | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Calling 'tsk_tree_init' | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3090:5: note: Taking false branch | |
| if (tree_sequence == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3094:5: note: Taking false branch | |
| if (options & TSK_SAMPLE_COUNTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3110:23: note: Memory is allocated | |
| self->right_sib = malloc(num_nodes * sizeof(tsk_id_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:33: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:61: note: Assuming the condition is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:12: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:9: note: Left side of '||' is false | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3112:38: note: Assuming the condition is false | |
| || self->left_sib == NULL || self->right_sib == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3111:5: note: Taking false branch | |
| if (self->parent == NULL || self->left_child == NULL || self->right_child == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:9: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:33: note: Assuming the condition is false | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3119:5: note: Taking false branch | |
| if (self->stack1 == NULL || self->stack2 == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3122:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:42: note: Assuming the condition is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:13: note: Left side of '||' is false | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3127:16: note: Assuming the condition is false | |
| || self->marked == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3126:9: note: Taking false branch | |
| if (self->num_samples == NULL || self->num_tracked_samples == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3131:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:42: note: Assuming the condition is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:13: note: Left side of '||' is false | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3136:16: note: Assuming the condition is false | |
| || self->next_sample == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3135:9: note: Taking false branch | |
| if (self->left_sample == NULL || self->right_sample == NULL | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:15: note: Returned allocated memory | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is false. Execution continues on line 4935 | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4939:5: note: Taking false branch | |
| if (ret != 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4943:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4950:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4953:19: note: Calling 'tsk_tree_next' | |
| while ((ret = tsk_tree_next(&trees[1])) == 1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4122:5: note: Taking true branch | |
| if (self->index == -1) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4123:15: note: Calling 'tsk_tree_first' | |
| ret = tsk_tree_first(self); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:9: note: Assuming the condition is true | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4054:5: note: Taking true branch | |
| if (tables->edges.num_rows > 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4060:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4069:15: note: Calling 'tsk_tree_advance' | |
| ret = tsk_tree_advance(self, TSK_DIR_FORWARD, tables->edges.right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3978:5: note: Taking true branch | |
| if (direction == TSK_DIR_FORWARD) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3983:5: note: Loop condition is false. Execution continues on line 3993 | |
| while (out >= 0 && out < num_edges && out_breakpoints[out_order[out]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:12: note: Left side of '&&' is true | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3993:5: note: Loop condition is true. Entering loop body | |
| while (in >= 0 && in < num_edges && in_breakpoints[in_order[in]] == x) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3996:15: note: Calling 'tsk_tree_insert_edge' | |
| ret = tsk_tree_insert_edge(self, edge_parent[k], edge_child[k]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3878:5: note: Taking false branch | |
| if (parent[c] != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:9: note: Assuming the condition is false | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3886:5: note: Taking false branch | |
| if (u == TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3897:5: note: Taking true branch | |
| if (!(self->options & TSK_NO_SAMPLE_COUNTS)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:16: note: Assuming the condition is false | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3904:9: note: Loop condition is false. Execution continues on line 3913 | |
| while (u != TSK_NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3913:9: note: Taking false branch | |
| if (IS_ROOT(c)) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3938:35: note: Left side of '&&' is false | |
| if (IS_ROOT(path_end) && !path_end_was_root) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3953:5: note: Taking true branch | |
| if (self->options & TSK_SAMPLE_LISTS) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3957:12: note: Potential leak of memory pointed to by 'right_sib' | |
| return ret; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4157:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return value | (1ULL << bit); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4163:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| return (value & (1ULL << bit)) != 0; | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4348:23: warning: Potential memory leak [clang-analyzer-unix.Malloc] | |
| self->num_nodes = tsk_treeseq_get_num_nodes(tree_sequence); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is true. Entering loop body | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4906:5: note: Loop condition is false. Execution continues on line 4914 | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4915:5: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4925:15: note: Calling 'tsk_diff_iter_init' | |
| ret = tsk_diff_iter_init(&diff_iters[i], treeseqs[i]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4355:29: note: Memory is allocated | |
| self->edge_list_nodes = malloc(self->num_edges * sizeof(*self->edge_list_nodes)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4356:9: note: Assuming the condition is false | |
| if (self->edge_list_nodes == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4356:5: note: Taking false branch | |
| if (self->edge_list_nodes == NULL) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4925:15: note: Returned allocated memory | |
| ret = tsk_diff_iter_init(&diff_iters[i], treeseqs[i]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4926:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4930:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4920:5: note: Loop condition is true. Entering loop body | |
| for (i = 0; i < 2; i++) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4922:9: note: Taking false branch | |
| if (ret != 0) { | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4925:15: note: Calling 'tsk_diff_iter_init' | |
| ret = tsk_diff_iter_init(&diff_iters[i], treeseqs[i]); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4348:23: note: Potential memory leak | |
| self->num_nodes = tsk_treeseq_get_num_nodes(tree_sequence); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4506:22: warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [misc-misplaced-widening-cast] | |
| self->m = calloc((size_t)(self->N + self->n), sizeof(tsk_size_t)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4507:22: warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [misc-misplaced-widening-cast] | |
| self->M = calloc((size_t)(self->N + self->n), sizeof(double)); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4826:17: warning: redundant cast to the same type [google-readability-casting] | |
| depth = (tsk_size_t) stack[stack_top].depth; | |
| ^~~~~~~~~~~~~~~~~~ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4921:53: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
| ret = tsk_tree_init(&trees[i], treeseqs[i], TSK_SAMPLE_LISTS); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:46:38: note: expanded from macro 'TSK_SAMPLE_LISTS' | |
| #define TSK_SAMPLE_LISTS (1 << 1) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:225:5: warning: function 'tsk_treeseq_load' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_load(tsk_treeseq_t *self, const char *filename, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:437:1: note: the definition seen here | |
| tsk_treeseq_load( | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:225:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_treeseq_load(tsk_treeseq_t *self, const char *filename, tsk_flags_t options); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:275:5: warning: function 'tsk_treeseq_genealogical_nearest_neighbours' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:604:1: note: the definition seen here | |
| tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:275:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_treeseq_genealogical_nearest_neighbours(tsk_treeseq_t *self, tsk_id_t *focal, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:278:5: warning: function 'tsk_treeseq_mean_descendants' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_mean_descendants(tsk_treeseq_t *self, tsk_id_t **reference_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:786:1: note: the definition seen here | |
| tsk_treeseq_mean_descendants(tsk_treeseq_t *self, tsk_id_t **reference_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:278:5: note: differing parameters are named here: ('options'), in definition: ('TSK_UNUSED_options') | |
| int tsk_treeseq_mean_descendants(tsk_treeseq_t *self, tsk_id_t **reference_sets, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:286:5: warning: function 'tsk_treeseq_general_stat' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_treeseq_general_stat(tsk_treeseq_t *self, size_t K, double *W, size_t M, | |
| ^ ~~ ~~ ~~ | |
| state_dim sample_weights result_dim | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:1672:1: note: the definition seen here | |
| tsk_treeseq_general_stat(tsk_treeseq_t *self, size_t state_dim, double *sample_weights, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:286:5: note: differing parameters are named here: ('K', 'W', 'M', 'sigma'), in definition: ('state_dim', 'sample_weights', 'result_dim', 'result') | |
| int tsk_treeseq_general_stat(tsk_treeseq_t *self, size_t K, double *W, size_t M, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:393:5: warning: function 'tsk_tree_depth' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_tree_depth(tsk_tree_t *self, tsk_id_t u, tsk_size_t *depth); | |
| ^ ~~~~~~ | |
| depth_ret | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:3584:1: note: the definition seen here | |
| tsk_tree_depth(tsk_tree_t *self, tsk_id_t u, tsk_size_t *depth_ret) | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:393:5: note: differing parameters are named here: ('depth'), in definition: ('depth_ret') | |
| int tsk_tree_depth(tsk_tree_t *self, tsk_id_t u, tsk_size_t *depth); | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:401:5: warning: function 'tsk_tree_map_mutations' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_tree_map_mutations(tsk_tree_t *self, int8_t *genotypes, double *cost_matrix, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4188:1: note: the definition seen here | |
| tsk_tree_map_mutations(tsk_tree_t *self, int8_t *genotypes, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:401:5: note: differing parameters are named here: ('cost_matrix', 'options', 'ancestral_state', 'num_transitions', 'transitions'), in definition: ('TSK_UNUSED_cost_matrix', 'TSK_UNUSED_options', 'r_ancestral_state', 'r_num_transitions', 'r_transitions') | |
| int tsk_tree_map_mutations(tsk_tree_t *self, int8_t *genotypes, double *cost_matrix, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:414:5: warning: function 'tsk_diff_iter_next' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] | |
| int tsk_diff_iter_next(tsk_diff_iter_t *self, double *left, double *right, | |
| ^ ~~~~~ ~~~~~~ | |
| ret_left ret_right | |
| /home/benj/projects/tskit/c/build/../tskit/trees.c:4383:1: note: the definition seen here | |
| tsk_diff_iter_next(tsk_diff_iter_t *self, double *ret_left, double *ret_right, | |
| ^ | |
| /home/benj/projects/tskit/c/build/../tskit/trees.h:414:5: note: differing parameters are named here: ('left', 'right', 'edges_out', 'edges_in'), in definition: ('ret_left', 'ret_right', 'edges_out_ret', 'edges_in_ret') | |
| int tsk_diff_iter_next(tsk_diff_iter_t *self, double *left, double *right, | |
| ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment