From 776fbaa78d28b41c417f8ff0299a829951f236a8 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Sun, 16 Mar 2008 18:08:43 -0300 Subject: [PATCH] Compile warning fixes. Ansify some function definitions and prototypes. --- menu.c | 24 ++++++++++++------------ miscfuncs.c | 3 ++- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/menu.c b/menu.c index 96d1b1f..56444f6 100644 --- a/menu.c +++ b/menu.c @@ -31,10 +31,10 @@ in this Software without prior written authorization from the X Consortium. #include "bboxint.h" -void AttachMenuToButton(button, menu, menu_name) - Button button; - Widget menu; - char * menu_name; +void AttachMenuToButton( + Button button, + Widget menu, + char *menu_name) { Arg args[3]; @@ -47,10 +47,10 @@ void AttachMenuToButton(button, menu, menu_name) /*ARGSUSED*/ -void DoRememberMenuSelection(widget, client_data, call_data) - Widget widget; /* menu entry object */ - XtPointer client_data; - XtPointer call_data; +void DoRememberMenuSelection( + Widget widget, /* menu entry object */ + XtPointer client_data, + XtPointer call_data) { static Arg args[] = { { XtNpopupOnEntry, (XtArgVal) NULL }, @@ -60,10 +60,10 @@ void DoRememberMenuSelection(widget, client_data, call_data) } -void SendMenuEntryEnableMsg(button, entry_name, value) - Button button; - char * entry_name; - int value; +void SendMenuEntryEnableMsg( + Button button, + char *entry_name, + int value) { Widget entry; static Arg args[] = {{XtNsensitive, (XtArgVal) NULL}}; diff --git a/miscfuncs.c b/miscfuncs.c index 1f2cf34..ea6454b 100644 --- a/miscfuncs.c +++ b/miscfuncs.c @@ -163,7 +163,8 @@ ScanDir( /* Sort? */ if (i) - qsort((char *)names, i, sizeof(char *), (int (*)())StrCmp); + qsort((char *)names, i, sizeof(char *), + (int (*)(const void *, const void *))StrCmp); return(i); } -- 1.5.3.2