1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

libcsa: Resolve all strict-prototype warnings

This commit is contained in:
Peter Howkins 2020-08-01 22:45:55 +01:00
parent ce4fad4c5a
commit f4eb62fa69
12 changed files with 21 additions and 29 deletions

View file

@ -83,7 +83,7 @@ static u_long gettransient (u_long version);
#else
static u_long gettransient (int proto, u_long vers, int *sockp);
#endif
static void _DtCm_handle_callback();
static void _DtCm_handle_callback(void);
static CSA_return_code _ConvertCallbackData(cmcb_update_callback_args *args,
_CallbackInfo **cbi);
static CSA_return_code _CopyAttributeNames(uint fnum, char **fnames,
@ -110,12 +110,6 @@ _DtCm_init_agent(void)
const char *);
#endif
#if defined(SunOS)
extern void (*sigset(int, void (*)(int)))(int);
#else
extern void (*sigset())();
#endif
/* locking candidate for MT-safe purpose */
if (mapped == 1)
return;
@ -155,14 +149,14 @@ _DtCm_init_agent(void)
}
if (registerrpc(_DtCm_transient, AGENTVERS, update_callback,
(char *(*)())_DtCm_update_callback_1, (xdrproc_t)_DtCm_xdr_Table_Res_4,
(char *(*)(char *))_DtCm_update_callback_1, (xdrproc_t)_DtCm_xdr_Table_Res_4,
(xdrproc_t)_DtCm_xdr_Update_Status) == -1) {
_DtCm_print_errmsg("Cannot register v1 callback handler\n");
_DtCm_print_errmsg("Callback cannot be enabled.\n");
}
if (registerrpc(_DtCm_transient, AGENTVERS_2, CMCB_UPDATE_CALLBACK,
(char *(*)())cmcb_update_callback_2_svc,
(char *(*)(char *))cmcb_update_callback_2_svc,
(xdrproc_t)xdr_cmcb_update_callback_args, (xdrproc_t)xdr_void) == -1) {
_DtCm_print_errmsg("Cannot register v2 callback handler\n");
_DtCm_print_errmsg("Callback cannot be enabled.\n");

View file

@ -33,8 +33,8 @@
#include "ansi_c.h"
extern void _DtCm_init_agent P(());
extern void _DtCm_destroy_agent P(());
extern void _DtCm_process_updates P(());
extern void _DtCm_init_agent P((void));
extern void _DtCm_destroy_agent P((void));
extern void _DtCm_process_updates P((void));
#endif /* _AGENT_P_H */

View file

@ -38,7 +38,7 @@
#include "rtable4.h"
#include "ansi_c.h"
extern Appt_4 *_DtCm_make_appt4 P(());
extern Appt_4 *_DtCm_make_appt4 P((boolean_t alloc));
extern Appt_4 *_DtCm_copy_one_appt4 P((Appt_4 *a4));
@ -56,7 +56,7 @@ extern void _DtCm_free_appt4 P((Appt_4 *a));
extern void _DtCm_free_abbrev_appt4 P((Abb_Appt_4 *a));
extern Attribute_4 * _DtCm_make_attr4 P(());
extern Attribute_4 * _DtCm_make_attr4 P((void));
extern void _DtCm_free_attr4 P((Attribute_4 *a));
@ -74,6 +74,4 @@ extern void _DtCm_free_access_list4 P((Access_Entry_4 *l));
extern void _DtCm_free_excpt4 P((Except_4 *e));
extern char * _DtCm_get_default_what_string P(());
#endif

View file

@ -40,7 +40,7 @@
extern _DtCmNameTable *_DtCm_cal_name_tbl;
extern _DtCmNameTable *_DtCm_entry_name_tbl;
extern void _DtCm_init_hash P(());
extern void _DtCm_init_hash P((void));
extern cms_entry *_DtCm_make_cms_entry P((_DtCmNameTable *tbl));

View file

@ -45,7 +45,7 @@ extern CSA_entry_handle *_DtCm_alloc_entry_handles(uint num_elem);
extern CSA_reminder_reference *_DtCm_alloc_reminder_references(uint num_elem);
extern void *_DtCm_alloc_entry();
extern void *_DtCm_alloc_entry(uint num_elem);
extern CSA_return_code _DtCm_free(void *ptr);

View file

@ -101,7 +101,7 @@ Author: Bart Smaalders 1/89
#include <string.h>
#include "hash.h"
static int hash_string();
static int hash_string(const char *s, int modulo);
typedef struct hash_entry {
struct hash_entry
@ -205,7 +205,7 @@ void ** _DtCmFindHash(void * t, const unsigned char * key)
return(NULL);
}
void _DtCmDestroyHash(void * t, int (*ptr)(), void * usr_arg)
void _DtCmDestroyHash(void * t, int (*ptr)(void *, void *, unsigned char *), void * usr_arg)
{
hash * tbl = (hash *) t;
hash_entry * tmp = tbl->start, * prev;
@ -225,7 +225,7 @@ void _DtCmDestroyHash(void * t, int (*ptr)(), void * usr_arg)
free(tbl);
}
static int hash_string(char *s, int modulo)
static int hash_string(const char *s, int modulo)
{
unsigned result = 0;
int i=1;

View file

@ -39,7 +39,7 @@ extern void ** _DtCmGetHash P((void * tbl, const unsigned char * key));
extern void ** _DtCmFindHash P((void * tbl,const unsigned char * key));
extern void _DtCmDestroyHash P((void * tbl, int (*des_func)(), void * usr_arg));
extern void _DtCmDestroyHash P((void * t, int (*ptr)(void *, void *, unsigned char *), void * usr_arg));
#endif /* _HASH_H */

View file

@ -35,13 +35,13 @@
extern char *_DtCmGetPrefix P((char *str, char sep));
extern char *_DtCmGetLocalHost P(());
extern char *_DtCmGetLocalHost P((void));
extern char *_DtCmGetLocalDomain P((char *hostname));
extern char *_DtCmGetHostAtDomain P(());
extern char *_DtCmGetHostAtDomain P((void));
extern char *_DtCmGetUserName P(());
extern char *_DtCmGetUserName P((void));
extern boolean_t _DtCmIsUserName P((char *user));

View file

@ -19,7 +19,7 @@
/* The parsed rule is stored in this structure */
RepeatEvent *_DtCm_repeat_info;
extern int yylex();
extern int yylex(void);
extern void yyerror(char*);
static int CompareNums(const void *, const void *);

View file

@ -58,7 +58,7 @@ extern "C" {
#include "connection.h"
extern bool_t xdr_time_t();
extern bool_t xdr_time_t(XDR *xdrs, time_t *objp);
typedef char *Buffer_2;

View file

@ -57,7 +57,7 @@ extern "C" {
#include "connection.h"
extern bool_t xdr_time_t();
extern bool_t xdr_time_t(XDR *xdrs, time_t *objp);
typedef char *Buffer_3;

View file

@ -61,7 +61,7 @@ extern "C" {
#include "connection.h"
extern bool_t xdr_time_t();
extern bool_t xdr_time_t(XDR *xdrs, time_t *objp);
typedef char *Buffer_4;