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