Mark error handlers as "noreturn"
Match X headers to satisfy newer compilers.
This commit is contained in:
parent
ef2c655f55
commit
ae767ed3dc
|
|
@ -285,7 +285,7 @@ static void ErrorHandler(
|
|||
Display *disp,
|
||||
XErrorEvent *event) ;
|
||||
static void ToolkitErrorHandler(
|
||||
char *message) ;
|
||||
char *message) __attribute__((noreturn)) ;
|
||||
static void Usage(
|
||||
char **argv) ;
|
||||
static void RestrictModeUsage(
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ static void MyInsert( Widget w, XEvent *event, char **params,
|
|||
static void MyBackspace( Widget w, XEvent *event, char **params,
|
||||
Cardinal *num_params) ;
|
||||
static int ErrorHandler( Display *dpy, XErrorEvent *event) ;
|
||||
static void xtErrorHandler( String msg ) ;
|
||||
static void xtErrorHandler( String msg ) __attribute__((noreturn)) ;
|
||||
static void xtWarningHandler( String msg ) ;
|
||||
static void MakeOptionsProc( XtPointer data, XtIntervalId *id) ;
|
||||
static SIGVAL Terminate( int arg ) ;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: Debug.c /main/5 1998/04/06 13:32:19 mgreess $ */
|
||||
#define _POSIX_C_SOURCE 2
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
|
@ -39,7 +40,7 @@ static const char *SysErrorMsg(int n);
|
|||
/* Error Handlers */
|
||||
static int XIOError(Display *dpy);
|
||||
static int XError(Display *dpy, XErrorEvent *event);
|
||||
static void _XtError(String);
|
||||
static void _XtError(String) __attribute__((noreturn));
|
||||
|
||||
static Boolean G_DumpCore;
|
||||
|
||||
|
|
@ -59,6 +60,7 @@ Debug(
|
|||
* FUNCTION:
|
||||
* RETURNS:
|
||||
*/
|
||||
__attribute__((noreturn))
|
||||
static int
|
||||
XError(
|
||||
Display *dpy,
|
||||
|
|
@ -69,8 +71,7 @@ XError(
|
|||
return 0;
|
||||
if (G_DumpCore)
|
||||
kill(getpid(), SIGQUIT);
|
||||
else
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -78,6 +79,7 @@ XError(
|
|||
* FUNCTION:
|
||||
* RETURNS:
|
||||
*/
|
||||
__attribute__((noreturn))
|
||||
static int
|
||||
XIOError(
|
||||
Display *dpy
|
||||
|
|
@ -92,8 +94,7 @@ XIOError(
|
|||
fprintf(stderr, INT_MESSAGE5);
|
||||
if (G_DumpCore)
|
||||
kill(getpid(), SIGQUIT);
|
||||
else
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -245,6 +246,7 @@ PrintXError(
|
|||
* FUNCTION:
|
||||
* RETURNS:
|
||||
*/
|
||||
__attribute__((noreturn))
|
||||
static void
|
||||
_XtError(
|
||||
String string
|
||||
|
|
@ -253,6 +255,5 @@ _XtError(
|
|||
(void)fprintf(stderr, "XtToolkit Error: %s\n", string);
|
||||
if (G_DumpCore)
|
||||
kill(getpid(), SIGQUIT);
|
||||
else
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ NlsStrings smNLS;
|
|||
static int LibError( Display *, XErrorEvent *) ;
|
||||
static int LibIOError( void ) ;
|
||||
static void ToolkitWarning( char *) ;
|
||||
static void ToolkitError( char *) ;
|
||||
static void ToolkitError( char *) __attribute__((noreturn)) ;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ static int IOErrorHandler(
|
|||
Display *disp ) ;
|
||||
|
||||
static void ToolkitErrorHandler(
|
||||
char *message) ;
|
||||
char *message) __attribute__((noreturn)) ;
|
||||
static void errParentMap(
|
||||
Widget w,
|
||||
XtPointer client_data,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ extern void PrintFormatted(char *f, char *s0, char *s1, char *s2, char *s3, char
|
|||
extern void WmInitErrorHandler (Display *display);
|
||||
extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent);
|
||||
extern int WmXIOErrorHandler (Display *display);
|
||||
extern void WmXtErrorHandler (char *message);
|
||||
extern void WmXtErrorHandler (char *message) __attribute__((noreturn));
|
||||
extern void WmXtWarningHandler (char *message);
|
||||
extern void Warning (char *message);
|
||||
#ifndef NO_MESSAGE_CATALOG
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
extern void AddSMCallbacks(void);
|
||||
extern void ResignFromSM(void);
|
||||
extern void ExitWM(int exitCode);
|
||||
extern void ExitWM(int exitCode) __attribute__((noreturn));
|
||||
extern XrmDatabase LoadClientResourceDB(void);
|
||||
extern XrmDatabase SaveClientResourceDB(void);
|
||||
extern Boolean FindClientDBMatch(ClientData *, char **);
|
||||
|
|
|
|||
Loading…
Reference in New Issue