1
1

Create another enum item that means the attribute is not initialized. The problem,

was that the compilers complain about setting a variable of an enum type to something
not in the enum.

This commit was SVN r10737.
Этот коммит содержится в:
George Bosilca 2006-07-11 15:28:32 +00:00
родитель 11125dd67a
Коммит 623dd3357d
2 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -436,7 +436,7 @@ static void attribute_value_construct(attribute_value_t *item)
static void
ompi_attrkey_item_construct(ompi_attrkey_item_t *item)
{
item->attr_type = 0;
item->attr_type = UNUSED_ATTR;
item->attr_flag = 0;
item->copy_attr_fn.attr_communicator_copy_fn = NULL;
item->delete_attr_fn.attr_communicator_copy_fn = NULL;

Просмотреть файл

@ -48,11 +48,12 @@
extern "C" {
#endif
enum ompi_attribute_type_t {
COMM_ATTR = 1, /**< The attribute belongs to a comm object. Starts
with 1 so that we can have it initialized to 0
using memset in the constructor */
TYPE_ATTR /**< The attribute belongs to datatype object */
, WIN_ATTR /**< The attribute belongs to a win object */
UNUSED_ATTR = 0, /**< Make the compilers happy when we have to construct an attribute */
COMM_ATTR, /**< The attribute belongs to a comm object. Starts
* with 1 so that we can have it initialized to 0
* using memset in the constructor */
TYPE_ATTR, /**< The attribute belongs to datatype object */
WIN_ATTR /**< The attribute belongs to a win object */
};
typedef enum ompi_attribute_type_t ompi_attribute_type_t;