diff options
author | Brad King <brad.king@kitware.com> | 2023-05-22 13:50:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-22 20:51:15 (GMT) |
commit | 71817dc37c9c9013e475c856aec95a5fb27bce46 (patch) | |
tree | 29628782e5899744fc9480f15316f6cadd91d919 /Source/CursesDialog | |
parent | 04b0d5c86291d14f485d1046957a6fcd22d65bee (diff) | |
download | CMake-71817dc37c9c9013e475c856aec95a5fb27bce46.zip CMake-71817dc37c9c9013e475c856aec95a5fb27bce46.tar.gz CMake-71817dc37c9c9013e475c856aec95a5fb27bce46.tar.bz2 |
ccmake: Tell clang-analyzer a loop body runs at least once
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/form/frm_def.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/CursesDialog/form/frm_def.c b/Source/CursesDialog/form/frm_def.c index 645b3ba..569057b 100644 --- a/Source/CursesDialog/form/frm_def.c +++ b/Source/CursesDialog/form/frm_def.c @@ -220,6 +220,10 @@ static int Connect_Fields(FORM * form, FIELD ** fields) for(page_nr = 0;page_nr < form->maxpage; page_nr++) { FIELD *fld = (FIELD *)0; + #ifdef __clang_analyzer__ + /* Tell clang-analyzer the loop body runs at least once. */ + assert(form->page[page_nr].pmin <= form->page[page_nr].pmax); + #endif for(j = form->page[page_nr].pmin;j <= form->page[page_nr].pmax;j++) { fields[j]->index = j; |