1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Fixed pedantic syntax errors caused by a trailing semicolon in the

definition of EVENTHANDLER_DECLARE().

Removed all other trailing semicolons in macro definitions.  The
ones after `do ... while (0)' wrappers defeated the point of the
wrappers but were harmless.

Enforce semicolons after invocation of declaration-like macros.
This commit is contained in:
Bruce Evans 2000-01-16 06:11:33 +00:00
parent 13320cf44a
commit 5ac51c3b6a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56093

View File

@ -65,10 +65,12 @@ struct eventhandler_entry_ ## name \
{ \
struct eventhandler_entry ee; \
type eh_func; \
};
}; \
struct __hack
#define EVENTHANDLER_FAST_DEFINE(name, type) \
struct eventhandler_list Xeventhandler_list_ ## name = { #name };
#define EVENTHANDLER_FAST_DEFINE(name, type) \
struct eventhandler_list Xeventhandler_list_ ## name = { #name }; \
struct __hack
#define EVENTHANDLER_FAST_INVOKE(name, args...) \
do { \
@ -79,7 +81,7 @@ do { \
((struct eventhandler_entry_ ## name *)_ep)->eh_func(_ep->ee_arg , ## args); \
_ep = TAILQ_NEXT(_ep, ee_link); \
} \
} while (0);
} while (0)
#define EVENTHANDLER_FAST_REGISTER(name, func, arg, priority) \
eventhandler_register(Xeventhandler_list_ ## name, #name, func, arg, priority)
@ -100,7 +102,8 @@ struct eventhandler_entry_ ## name \
{ \
struct eventhandler_entry ee; \
type eh_func; \
};
}; \
struct __hack
#define EVENTHANDLER_INVOKE(name, args...) \
do { \
@ -114,7 +117,7 @@ do { \
((struct eventhandler_entry_ ## name *)_ep)->eh_func(_ep->ee_arg , ## args); \
} \
} \
} while (0);
} while (0)
#define EVENTHANDLER_REGISTER(name, func, arg, priority) \
eventhandler_register(NULL, #name, func, arg, priority)
@ -125,7 +128,7 @@ do { \
\
if ((_el = eventhandler_find_list(#name)) != NULL) \
eventhandler_deregister(_el, tag); \
} while(0);
} while(0)
extern eventhandler_tag eventhandler_register(struct eventhandler_list *list,