- fix some signed/unsigned comparisons
- print out that the test is *supposed* to generate a warning This commit was SVN r4996.
Этот коммит содержится в:
родитель
08328e3d79
Коммит
b27ea0c413
@ -25,15 +25,15 @@ typedef struct test_data {
|
|||||||
/* link list data structure */
|
/* link list data structure */
|
||||||
ompi_list_item_t ll_element;
|
ompi_list_item_t ll_element;
|
||||||
/* test data */
|
/* test data */
|
||||||
int data;
|
size_t data;
|
||||||
} test_data_t;
|
} test_data_t;
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
/* local variables */
|
/* local variables */
|
||||||
ompi_list_t list, x;
|
ompi_list_t list, x;
|
||||||
size_t list_size, tmp_size_1, tmp_size_2;
|
size_t indx,i,list_size, tmp_size_1, tmp_size_2,size_elements;
|
||||||
int size_elements,i,indx,error_cnt;
|
int error_cnt;
|
||||||
test_data_t *elements, *ele;
|
test_data_t *elements, *ele;
|
||||||
ompi_list_item_t *item;
|
ompi_list_item_t *item;
|
||||||
|
|
||||||
@ -262,6 +262,7 @@ int main(int argc, char **argv)
|
|||||||
#ifdef OMPI_ENABLE_DEBUG
|
#ifdef OMPI_ENABLE_DEBUG
|
||||||
/* try and remove a non existant element from the list -
|
/* try and remove a non existant element from the list -
|
||||||
* testing debug code */
|
* testing debug code */
|
||||||
|
printf("This should generate a warning:\n");
|
||||||
ele = (test_data_t *)
|
ele = (test_data_t *)
|
||||||
ompi_list_remove_item(&list,(ompi_list_item_t *)(elements+indx));
|
ompi_list_remove_item(&list,(ompi_list_item_t *)(elements+indx));
|
||||||
if( ((test_data_t *)NULL) == ele ) {
|
if( ((test_data_t *)NULL) == ele ) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user