Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at mail-index-sync.c:819

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

mail_index_sync_keywords_apply

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index-sync.c)expand/collapse
Show more  
 786  bool mail_index_sync_keywords_apply(const struct mail_index_sync_rec *sync_rec,
 787                                      ARRAY_TYPE(keyword_indexes) *keywords)
 788  {
 789          const unsigned int *keyword_indexes;
 790          unsigned int idx = sync_rec->keyword_idx;
 791          unsigned int i, count;
 792   
 793          keyword_indexes = array_get(keywords, &count);
 794          switch (sync_rec->type) {
 795          case MAIL_INDEX_SYNC_TYPE_KEYWORD_ADD:
 796                  for (i = 0; i < count; i++) {
 797                          if (keyword_indexes[i] == idx)
 798                                  return FALSE;
 799                  }
 800   
 801                  array_append(keywords, &idx, 1);
 802                  return TRUE;
 803          case MAIL_INDEX_SYNC_TYPE_KEYWORD_REMOVE:
 804                  for (i = 0; i < count; i++) {
 805                          if (keyword_indexes[i] == idx) {
 806                                  array_delete(keywords, i, 1);
 807                                  return TRUE;
 808                          }
 809                  }
 810                  return FALSE;
 811          case MAIL_INDEX_SYNC_TYPE_KEYWORD_RESET:
 812                  if (array_count(keywords) == 0)
 813                          return FALSE;
 814   
 815                  array_clear(keywords);
 816                  return TRUE;
 817          default:
 818                  i_unreached();
 819                  return FALSE;
 820          }
 821  }
Show more  




Change Warning 7260.24571 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: