diff --git a/include/ompi_config_bottom.h b/include/ompi_config_bottom.h index ebb6a152db..cc97d0b95f 100644 --- a/include/ompi_config_bottom.h +++ b/include/ompi_config_bottom.h @@ -29,11 +29,13 @@ #endif #if defined(WIN32) -#if defined(OMPI_BUILDING) && OMPI_BUILDING -#define OMPI_DECLSPEC __declspec(dllexport) -#else -#define OMPI_DECLSPEC __declspec(dllimport) -#endif +# if defined(OMPI_BUILDING) +# if OMPI_BUILDING +# define OMPI_DECLSPEC __declspec(dllexport) +# else +# define OMPI_DECLSPEC __declspec(dllimport) +# endif +# endif #endif #ifndef OMPI_DECLSPEC @@ -168,9 +170,11 @@ typedef long long bool; /* * Do we want to override debugging controls? */ -#if defined(OMPI_ENABLE_DEBUG_OVERRIDE) && OMPI_ENABLE_DEBUG_OVERRIDE -#undef OMPI_ENABLE_DEBUG -#define OMPI_ENABLE_DEBUG 1 +#if defined(OMPI_ENABLE_DEBUG_OVERRIDE) +# if OMPI_ENABLE_DEBUG_OVERRIDE +# undef OMPI_ENABLE_DEBUG +# define OMPI_ENABLE_DEBUG 1 +# endif #endif diff --git a/src/attribute/attribute.c b/src/attribute/attribute.c index cfcb36c6b7..0e63f0337f 100644 --- a/src/attribute/attribute.c +++ b/src/attribute/attribute.c @@ -90,10 +90,11 @@ static void ompi_attrkey_item_destruct(ompi_attrkey_item_t *item); * ompi_attribute_entry_t classes */ -OBJ_CLASS_INSTANCE(ompi_attrkey_item_t, - ompi_object_t, - ompi_attrkey_item_construct, - ompi_attrkey_item_destruct); +struct ompi_attrkey_item_t_class; +static OBJ_CLASS_INSTANCE(ompi_attrkey_item_t, + ompi_object_t, + ompi_attrkey_item_construct, + ompi_attrkey_item_destruct); /* diff --git a/src/class/ompi_object.h b/src/class/ompi_object.h index 6d18ee1fb9..a4642fb8cd 100644 --- a/src/class/ompi_object.h +++ b/src/class/ompi_object.h @@ -194,7 +194,7 @@ do { \ assert(NULL != object); \ assert(NULL != ((ompi_object_t *) (object))->obj_class); \ - if (object) { \ + if (NULL != object) { \ ompi_obj_update((ompi_object_t *) (object), 1); \ } \ assert(((ompi_object_t *) (object))->obj_reference_count >= 0); \ @@ -238,7 +238,7 @@ if (0 == (type)->cls_initialized) { \ ompi_class_initialize((type)); \ } \ - if (object) { \ + if (NULL != object) { \ ((ompi_object_t *) (object))->obj_class = (type); \ ((ompi_object_t *) (object))->obj_reference_count = 1; \ ompi_obj_run_constructors((ompi_object_t *) (object)); \ @@ -253,7 +253,7 @@ */ #define OBJ_DESTRUCT(object) \ do { \ - if (object) { \ + if (NULL != object) { \ ompi_obj_run_destructors((ompi_object_t *) (object)); \ } \ } while (0)