Skip to content

Commit

Permalink
Merge pull request Unidata#2239 from seanm/Wstrict-prototypes
Browse files Browse the repository at this point in the history
Fixed Clang -Wstrict-prototypes warnings
  • Loading branch information
WardF authored Mar 9, 2022
2 parents c30801f + bb03191 commit 84b109e
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions include/nc3dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ extern "C" {

/* End _var */

extern int NC3_initialize();
extern int NC3_finalize();
extern int NC3_initialize(void);
extern int NC3_finalize(void);

#if defined(__cplusplus)
}
Expand Down
4 changes: 2 additions & 2 deletions libncpoco/cp_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static pthread_mutex_t mutex;
#endif

int
ncp_unix_initialize()
ncp_unix_initialize(void)
{
int ret = 1;
#ifdef USE_MUTEX
Expand All @@ -54,7 +54,7 @@ ncp_unix_initialize()
}

int
ncp_unix_finalize()
ncp_unix_finalize(void)
{
#ifdef USE_MUTEX
pthread_mutex_destroy(&mutex);
Expand Down
2 changes: 1 addition & 1 deletion libnczarr/zinternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int ncz_find_grp_var_att(int ncid, int varid, const char *name, int attnum,
int use_name, char *norm_name, NC_FILE_INFO_T** file,
NC_GRP_INFO_T** grp, NC_VAR_INFO_T** var,
NC_ATT_INFO_T** att);
int NCZ_set_log_level();
int NCZ_set_log_level(void);

/* zcache.c */
int ncz_adjust_var_cache(NC_GRP_INFO_T* grp, NC_VAR_INFO_T* var);
Expand Down
2 changes: 1 addition & 1 deletion ncdump/dumplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extern int is_user_defined_type ( nc_type type );
extern void init_epsilons ( void );

/* Initialize string buffer */
safebuf_t *sbuf_new();
safebuf_t *sbuf_new( void );

/* Copy string s2 to buffer in sbuf, growing if necessary */
void sbuf_cpy(safebuf_t *sbuf, const char *s2);
Expand Down
10 changes: 5 additions & 5 deletions ncdump/indent.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ extern "C" {
#endif

/* Handle nested group indentation */
extern void indent_init(); /* initialize indent to zero */
extern void indent_out(); /* output current indent */
extern void indent_more(); /* increment current indent */
extern void indent_less(); /* decrement current indent */
extern int indent_get(); /* return current indent */
extern void indent_init(void); /* initialize indent to zero */
extern void indent_out(void); /* output current indent */
extern void indent_more(void); /* increment current indent */
extern void indent_less(void); /* decrement current indent */
extern int indent_get(void); /* return current indent */

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion ncgen3/ncgen.l
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ FloatInf|-?Inff { /* missing value (pre-2.4 backward compatibility) */

/* Hack to keep compile quiet */
void
ignore()
ignore(void)
{
#ifndef YY_NO_UNPUT
yyunput(0,NULL);
Expand Down
10 changes: 5 additions & 5 deletions ncgen3/ncgen.y
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ static void *rec_cur; /* pointer to where next data value goes */
static void *rec_start; /* start of space for data */

/* Forward declarations */
void defatt();
void equalatt();
void defatt(void);
void equalatt(void);

#ifdef YYLEX_PARAM
int yylex(YYLEX_PARAM);
#else
int yylex();
int yylex(void);
#endif

#ifdef vms
Expand Down Expand Up @@ -770,7 +770,7 @@ const: CHAR_CONST
%%

/* HELPER PROGRAMS */
void defatt()
void defatt(void)
{
valnum = 0;
valtype = NC_UNSPECIFIED;
Expand All @@ -785,7 +785,7 @@ void defatt()
double_valp = (double *) att_space;
}

void equalatt()
void equalatt(void)
{
/* check if duplicate attribute for this var */
int i;
Expand Down
2 changes: 1 addition & 1 deletion ncgen3/ncgenl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2505,7 +2505,7 @@ void ncgfree (void * ptr )

/* Hack to keep compile quiet */
void
ignore()
ignore(void)
{
#ifndef YY_NO_UNPUT
yyunput(0,NULL);
Expand Down
10 changes: 5 additions & 5 deletions ncgen3/ncgeny.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ static void *rec_cur; /* pointer to where next data value goes */
static void *rec_start; /* start of space for data */

/* Forward declarations */
void defatt();
void equalatt();
void defatt(void);
void equalatt(void);

#ifdef YYLEX_PARAM
int yylex(YYLEX_PARAM);
#else
int yylex();
int yylex(void);
#endif

#ifdef vms
Expand Down Expand Up @@ -2359,7 +2359,7 @@ yyparse (void)


/* HELPER PROGRAMS */
void defatt()
void defatt(void)
{
valnum = 0;
valtype = NC_UNSPECIFIED;
Expand All @@ -2374,7 +2374,7 @@ void defatt()
double_valp = (double *) att_space;
}

void equalatt()
void equalatt(void)
{
/* check if duplicate attribute for this var */
int i;
Expand Down
2 changes: 1 addition & 1 deletion nctest/tst_rename.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ check_err(const int stat, const int line, const char *file) {
}

int
create_file()
create_file(void)
{
int stat; /* return status */
int ncid; /* netCDF id */
Expand Down
2 changes: 1 addition & 1 deletion oc2/ocinternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ extern OCerror ocset_useragent(OCstate* state, const char* agent);
extern OCerror ocset_netrc(OCstate* state, const char* path);

/* From ocrc.c */
extern OCerror ocrc_load(); /* find, read, and compile */
extern OCerror ocrc_load(void); /* find, read, and compile */
extern OCerror ocrc_process(OCstate* state); /* extract relevant triples */
extern char* ocrc_lookup(char* key, char* url);
extern struct OCTriple* ocrc_triple_iterate(char* key, char* url, struct OCTriple* prevp);
Expand Down
2 changes: 1 addition & 1 deletion oc2/xxdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ extern int xxdr_skip_strings(XXDR* xdrs, off_t n);

extern unsigned int xxdr_roundup(off_t n); /* procedural version of RNDUP macro */

extern void xxdr_init();
extern void xxdr_init(void);

/* Define some inlines */
#define xxdr_length(xdrs) ((xdrs)->length)
Expand Down

0 comments on commit 84b109e

Please sign in to comment.