diff options
author | Brad King <brad.king@kitware.com> | 2002-01-25 14:06:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-01-25 14:06:39 (GMT) |
commit | 0bdd309fe0f2269176f3912fecbca185048b9495 (patch) | |
tree | 952913f877058c058d16365b93d77a9b62a64782 /Source/CursesDialog/form | |
parent | 31561a7848d8c2b81ab2bc269e4b2c7e190402a7 (diff) | |
download | CMake-0bdd309fe0f2269176f3912fecbca185048b9495.zip CMake-0bdd309fe0f2269176f3912fecbca185048b9495.tar.gz CMake-0bdd309fe0f2269176f3912fecbca185048b9495.tar.bz2 |
ERR: Corrected assertions of pointers to remove warnings.
Diffstat (limited to 'Source/CursesDialog/form')
-rw-r--r-- | Source/CursesDialog/form/fld_def.c | 6 | ||||
-rw-r--r-- | Source/CursesDialog/form/frm_data.c | 4 | ||||
-rw-r--r-- | Source/CursesDialog/form/frm_def.c | 4 | ||||
-rw-r--r-- | Source/CursesDialog/form/frm_driver.c | 18 |
4 files changed, 16 insertions, 16 deletions
diff --git a/Source/CursesDialog/form/fld_def.c b/Source/CursesDialog/form/fld_def.c index 7b88693..4a49a25 100644 --- a/Source/CursesDialog/form/fld_def.c +++ b/Source/CursesDialog/form/fld_def.c @@ -101,7 +101,7 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) *err += 1; } else { - assert(typ->makearg); + assert(typ->makearg != 0); if ( !(res=(TypeArgument *)typ->makearg(ap)) ) *err += 1; } @@ -174,7 +174,7 @@ _nc_Free_Argument(const FIELDTYPE * typ, TypeArgument * argp) if (typ->status & _LINKED_TYPE) { - assert(argp); + assert(argp != 0); _nc_Free_Argument(typ->left ,argp->left ); _nc_Free_Argument(typ->right,argp->right); free(argp); @@ -231,7 +231,7 @@ _nc_Copy_Type(FIELD *dst, FIELD const *src) void _nc_Free_Type(FIELD *field) { - assert(field); + assert(field != 0); if (field->type) field->type->ref--; _nc_Free_Argument(field->type,(TypeArgument *)(field->arg)); diff --git a/Source/CursesDialog/form/frm_data.c b/Source/CursesDialog/form/frm_data.c index a96b4f1..f7ba55d 100644 --- a/Source/CursesDialog/form/frm_data.c +++ b/Source/CursesDialog/form/frm_data.c @@ -116,7 +116,7 @@ bool data_ahead(const FORM *form) int pos; field = form->current; - assert(form->w); + assert(form->w != 0); large_buffer = (field->cols > SMALL_BUFFER_SIZE); if (large_buffer) @@ -124,7 +124,7 @@ bool data_ahead(const FORM *form) else bp = buffer; - assert(bp); + assert(bp != 0); if (Single_Line_Field(field)) { diff --git a/Source/CursesDialog/form/frm_def.c b/Source/CursesDialog/form/frm_def.c index 489dae3..0b28f5f 100644 --- a/Source/CursesDialog/form/frm_def.c +++ b/Source/CursesDialog/form/frm_def.c @@ -78,7 +78,7 @@ static FIELD *Insert_Field_By_Position(FIELD *newfield, FIELD *head) { FIELD *current, *newhead; - assert(newfield); + assert(newfield != 0); if (!head) { /* empty list is trivial */ @@ -156,7 +156,7 @@ static int Connect_Fields(FORM * form, FIELD ** fields) int maximum_row_in_field, maximum_col_in_field; _PAGE *pg; - assert(form); + assert(form != 0); form->field = fields; form->maxfield = 0; diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c index 6e1af01..596371b 100644 --- a/Source/CursesDialog/form/frm_driver.c +++ b/Source/CursesDialog/form/frm_driver.c @@ -783,7 +783,7 @@ static void Undo_Justification(FIELD * field, WINDOW * win) if (len>0) { - assert(win); + assert(win != 0); wmove(win,0,0); waddnstr(win,bp,len); } @@ -808,7 +808,7 @@ static bool Check_Char(FIELDTYPE * typ, int ch, TypeArgument *argp) { if (typ->status & _LINKED_TYPE) { - assert(argp); + assert(argp != 0); return( Check_Char(typ->left ,ch,argp->left ) || Check_Char(typ->right,ch,argp->right) ); @@ -2560,14 +2560,14 @@ static bool Next_Choice(FIELDTYPE * typ, FIELD *field, TypeArgument *argp) if (typ->status & _LINKED_TYPE) { - assert(argp); + assert(argp != 0); return( Next_Choice(typ->left ,field,argp->left) || Next_Choice(typ->right,field,argp->right) ); } else { - assert(typ->next); + assert(typ->next != 0); return typ->next(field,(void *)argp); } } @@ -2592,14 +2592,14 @@ static bool Previous_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) if (typ->status & _LINKED_TYPE) { - assert(argp); + assert(argp != 0); return( Previous_Choice(typ->left ,field,argp->left) || Previous_Choice(typ->right,field,argp->right)); } else { - assert(typ->prev); + assert(typ->prev != 0); return typ->prev(field,(void *)argp); } } @@ -2673,7 +2673,7 @@ static bool Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) if (field->opts & O_NULLOK) { char *bp = field->buf; - assert(bp); + assert(bp != 0); while(is_blank(*bp)) { bp++; } if (*bp == '\0') @@ -2682,7 +2682,7 @@ static bool Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) if (typ->status & _LINKED_TYPE) { - assert(argp); + assert(argp != 0); return( Check_Field(typ->left ,field,argp->left ) || Check_Field(typ->right,field,argp->right) ); @@ -3667,7 +3667,7 @@ int form_driver(FORM * form, int c) if (!(form->field)) RETURN(E_NOT_CONNECTED); - assert(form->page); + assert(form->page != 0); if (c==FIRST_ACTIVE_MAGIC) { |