Commit ca55f514 authored by Alan Coopersmith's avatar Alan Coopersmith

Add additional printf & noreturn attributes suggested by gcc warnings

Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
parent 75de0f3d
......@@ -30,17 +30,25 @@ extern int sevenbit;
extern int ilog;
extern int olog;
void child(char *, char *, char *const *);
void parent(int, int);
void ErrorF(const char *f,...);
/* Not using _X_NORETURN since that would pull in extra dependencies */
/* Not using Xfuncproto.h since that would pull in extra dependencies */
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
void FatalError(const char *f,...) __attribute((noreturn));
# define LUIT_NORETURN __attribute__((noreturn))
#else
void FatalError(const char *f,...);
# define LUIT_NORETURN /* nothing */
#endif
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
# define LUIT_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
#else /* not gcc >= 2.3 */
# define LUIT_PRINTF(x,y) /* nothing */
#endif
void child(char *, char *, char *const *) LUIT_NORETURN;
void parent(int, int);
void ErrorF(const char *f,...) LUIT_PRINTF(1,2);
void FatalError(const char *f,...) LUIT_NORETURN LUIT_PRINTF(1,2);
#endif /* LUIT_LUIT_H */
Markdown is supported
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