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.
Этот коммит содержится в:
родитель
11125dd67a
Коммит
623dd3357d
@ -436,7 +436,7 @@ static void attribute_value_construct(attribute_value_t *item)
|
|||||||
static void
|
static void
|
||||||
ompi_attrkey_item_construct(ompi_attrkey_item_t *item)
|
ompi_attrkey_item_construct(ompi_attrkey_item_t *item)
|
||||||
{
|
{
|
||||||
item->attr_type = 0;
|
item->attr_type = UNUSED_ATTR;
|
||||||
item->attr_flag = 0;
|
item->attr_flag = 0;
|
||||||
item->copy_attr_fn.attr_communicator_copy_fn = NULL;
|
item->copy_attr_fn.attr_communicator_copy_fn = NULL;
|
||||||
item->delete_attr_fn.attr_communicator_copy_fn = NULL;
|
item->delete_attr_fn.attr_communicator_copy_fn = NULL;
|
||||||
|
@ -48,11 +48,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
enum ompi_attribute_type_t {
|
enum ompi_attribute_type_t {
|
||||||
COMM_ATTR = 1, /**< The attribute belongs to a comm object. Starts
|
UNUSED_ATTR = 0, /**< Make the compilers happy when we have to construct an attribute */
|
||||||
with 1 so that we can have it initialized to 0
|
COMM_ATTR, /**< The attribute belongs to a comm object. Starts
|
||||||
using memset in the constructor */
|
* with 1 so that we can have it initialized to 0
|
||||||
TYPE_ATTR /**< The attribute belongs to datatype object */
|
* using memset in the constructor */
|
||||||
, WIN_ATTR /**< The attribute belongs to a win object */
|
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;
|
typedef enum ompi_attribute_type_t ompi_attribute_type_t;
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user