diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-04-03 15:48:25 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-04-03 15:48:25 -0700 |
commit | 3ef81a443a264c48f606dfedd47eb160822457fa (patch) | |
tree | 0734e4bf7a8f847d0228c368f0dd236185785451 /xfontsel.c | |
parent | be2a75ec654722b282c9e2fac2b73a4dba9f50d0 (diff) |
mark Quit() & QuitAction() as noreturn
Clears gcc warnings:
xfontsel.c: In function ‘QuitAction’:
xfontsel.c:1477:1: warning: function might be candidate for
attribute ‘noreturn’ [-Wsuggest-attribute=noreturn]
QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
^~~~~~~~~~
xfontsel.c: In function ‘Quit’:
xfontsel.c:1392:6: warning: function might be candidate for
attribute ‘noreturn’ [-Wsuggest-attribute=noreturn]
void Quit(Widget w, XtPointer closure, XtPointer callData)
^~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xfontsel.c')
-rw-r--r-- | xfontsel.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -67,7 +67,7 @@ Modified: Mark Leisher <mleisher@crl.nmsu.edu> to deal with UCS sample text. void GetFontNames(XtPointer closure); Boolean Matches(String pattern, String fontName, Boolean fields[], int *maxfields); Boolean DoWorkPiece(XtPointer closure); -void Quit(Widget w, XtPointer closure, XtPointer callData); +void Quit(Widget w, XtPointer closure, XtPointer callData) _X_NORETURN; void OwnSelection(Widget w, XtPointer closure, XtPointer callData); void SelectField(Widget w, XtPointer closure, XtPointer callData); void ParseFontNames(XtPointer closure); @@ -79,7 +79,8 @@ void AnyValue(Widget w, XtPointer closure, XtPointer callData); void EnableOtherValues(Widget w, XtPointer closure, XtPointer callData); void EnableMenu(XtPointer closure); void SetCurrentFont(XtPointer closure); -void QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params); +void QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params) + _X_NORETURN; static XtActionsRec xfontsel_actions[] = { {"Quit", QuitAction} |