Skip to content
Snippets Groups Projects
Commit a30d6475 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

fix some warnings caused by '-pedantic' compiler flag

- use __typedef__ instead of typedef
- semicolon at the end of the function definition

norefs

Change-Id: Iae8aa04d02fdfa3f808367b339da6f4d9d529392
parent d26d7ae5
Branches
Tags
No related merge requests found
......@@ -60,7 +60,7 @@ int heap_init(struct heap *h, int (*cmp)(void *, void *), int init_size)
h->data = malloc((isize + 1) * sizeof(heap_val_t)); /* Temp element unused. */
return h->data ? 1 : 0;
};
}
static inline void _heap_bubble_down(struct heap *h, int e)
{
......
......@@ -45,11 +45,11 @@ typedef unsigned int uint; /*!< \brief Unsigned. */
#if 0 // Disabled due to a conflict with system MIN and MAX on BSDs.
/*! \brief Type-safe minimum macro. */
#define MIN(a, b) \
({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; })
({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
/*! \brief Type-safe maximum macro. */
#define MAX(a, b) \
({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })
({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b; })
#endif
/* Optimisation macros. */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment