summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2024-01-21 19:03:45 -0700
committerEduardo Chappa <chappa@washington.edu>2024-01-21 19:03:45 -0700
commita55202787df1d5cfd3e37cb4c021422ee4aa9530 (patch)
tree5e87cc67b7c0d5e1adcd686e9dc22f11a577e99c /pith
parent0f19719595e79516fdf57e59d0661260c23a1df4 (diff)
downloadalpine-a55202787df1d5cfd3e37cb4c021422ee4aa9530.tar.xz
* Clean up some function definitions to comply with strict
prototypes. Suggested and worked in part by Holger Hoffstätte.
Diffstat (limited to 'pith')
-rw-r--r--pith/adrbklib.c8
-rw-r--r--pith/busy.h2
-rw-r--r--pith/conf.h4
-rw-r--r--pith/debug.h2
-rw-r--r--pith/osdep/collate.c8
-rw-r--r--pith/osdep/collate.h6
-rw-r--r--pith/smime.c2
7 files changed, 16 insertions, 16 deletions
diff --git a/pith/adrbklib.c b/pith/adrbklib.c
index 51099302..578cb0dc 100644
--- a/pith/adrbklib.c
+++ b/pith/adrbklib.c
@@ -672,7 +672,7 @@ adrbk_is_in_sort_order(AdrBk *ab, int be_quiet)
{
adrbk_cntr_t entry;
AdrBk_Entry *ae, *ae_prev;
- int (*cmp_func)();
+ int (*cmp_func)(const qsort_t *, const qsort_t *);
int we_cancel = 0;
dprint((9, "- adrbk_is_in_sort_order -\n"));
@@ -1975,7 +1975,7 @@ adrbk_add(AdrBk *ab, a_c_arg_t old_entry_num, char *nickname, char *fullname,
AdrBk_Entry *ae;
adrbk_cntr_t old_enum;
adrbk_cntr_t new_enum;
- int (*cmp_func)();
+ int (*cmp_func)(const qsort_t *, const qsort_t *);
int retval = 0;
int need_write = 0;
int set_mangled = 0;
@@ -2908,7 +2908,7 @@ adrbk_write(AdrBk *ab, a_c_arg_t current_entry_num, adrbk_cntr_t *new_entry_num,
AdrBk_Entry *ae = NULL;
adrbk_cntr_t entry_num;
#ifndef DOS
- void (*save_sighup)();
+ void (*save_sighup)(int);
#endif
int max_nick = 0,
max_full = 0, full_two = 0, full_three = 0,
@@ -3011,7 +3011,7 @@ adrbk_write(AdrBk *ab, a_c_arg_t current_entry_num, adrbk_cntr_t *new_entry_num,
}
#ifndef DOS
- save_sighup = (void (*)())signal(SIGHUP, SIG_IGN);
+ save_sighup = (void (*)(int))signal(SIGHUP, SIG_IGN);
#endif
/*
diff --git a/pith/busy.h b/pith/busy.h
index e79f8eab..a867dad6 100644
--- a/pith/busy.h
+++ b/pith/busy.h
@@ -18,7 +18,7 @@
#define PITH_BUSY_INCLUDED
-typedef int (*percent_done_t)(); /* returns %done for progress status msg */
+typedef int (*percent_done_t)(void); /* returns %done for progress status msg */
/* used to tweak busy without it */
diff --git a/pith/conf.h b/pith/conf.h
index 3505f399..c8225fe2 100644
--- a/pith/conf.h
+++ b/pith/conf.h
@@ -930,10 +930,10 @@ void set_user_certs_container(struct pine *);
/* mandatory to implement prototypes */
int set_input_timeout(int);
-int get_input_timeout();
+int get_input_timeout(void);
/* decide what to do: return 0 to continue, nonzero to abort pinerc write */
-int unexpected_pinerc_change();
+int unexpected_pinerc_change(void);
#endif /* PITH_CONFIG_INCLUDED */
diff --git a/pith/debug.h b/pith/debug.h
index c33ac578..230ec642 100644
--- a/pith/debug.h
+++ b/pith/debug.h
@@ -45,7 +45,7 @@ extern int debug;
/* mandatory to implement stubs */
void output_debug_msg(int, char *fmt, ...);
void dump_configuration(int);
-void dump_contexts();
+void dump_contexts(void);
diff --git a/pith/osdep/collate.c b/pith/osdep/collate.c
index e8a90d21..1481d280 100644
--- a/pith/osdep/collate.c
+++ b/pith/osdep/collate.c
@@ -20,13 +20,13 @@
/*
* global hook
*/
-int (*pcollator)();
+int (*pcollator)(const char *, const char *);
void
set_collation(int collation, int ctype)
{
- extern int collator(); /* set to strcoll if available in system.h */
+ extern int collator(const char *, const char *); /* set to strcoll if available in system.h */
pcollator = strucmp;
@@ -90,7 +90,7 @@ sstrcasecmp(const qsort_t *s1, const qsort_t *s2)
Result: integer indicating which is greater
---*/
int
-strucmp(register char *o, register char *r)
+strucmp(const char *o, const char *r)
{
if(o == NULL){
if(r == NULL)
@@ -130,7 +130,7 @@ strucmp(register char *o, register char *r)
----*/
int
-struncmp(register char *o, register char *r, register int n)
+struncmp(const char *o, const char *r, int n)
{
if(n < 1)
return 0;
diff --git a/pith/osdep/collate.h b/pith/osdep/collate.h
index 182d0fde..e9051691 100644
--- a/pith/osdep/collate.h
+++ b/pith/osdep/collate.h
@@ -22,11 +22,11 @@
* Exported Prototypes
*/
void set_collation(int, int);
-int strucmp(char *, char *);
-int struncmp(char *, char *, int);
+int strucmp(const char *, const char *);
+int struncmp(const char *, const char *, int);
int sstrcasecmp(const qsort_t *, const qsort_t *);
-extern int (*pcollator)();
+extern int (*pcollator)(const char*, const char *);
#endif /* PITH_OSDEP_COLLATE_INCLUDED */
diff --git a/pith/smime.c b/pith/smime.c
index e330d1c9..d0ee89a1 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -2968,7 +2968,7 @@ do_signature_verify(PKCS7 *p7, BIO *in, BIO *out, int silent)
*/
typedef struct smime_filter_s {
- void (*filter)();
+ void (*filter)(char **, unsigned long *, char **, unsigned long *);
} SMIME_FILTER_S;
SMIME_FILTER_S sig_filter[] = {