Skip to content

Commit

Permalink
Remove redundant (and conflicting) function declarations
Browse files Browse the repository at this point in the history
The function fchtak() is implemented earlier in the same file. There
is therefore no need to declare the function later in the same file.
The later declarations redefines the function with an empty parameter
list, which conflicts with the original definition.

The function stat() is defined by including <sys/stat.h>. The
following daclaration redefines the function with an empty parameter
list, which conflicts with the original definition.

(cherry picked from commit d28f5ac)
  • Loading branch information
ellert authored and hageboeck committed Jan 27, 2025
1 parent 0a0e36e commit 097792b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misc/minicern/src/cernlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ int cfstati_(char *fname, int *info, int *lgname)
#endif
{
struct stat buf;
char *ptname, *fchtak();
int istat=-1, stat();
char *ptname;
int istat = -1;
ptname = fchtak(fname,*lgname);
if (ptname == ((void *)0)) return -1;
istat = stat(ptname, &buf);
Expand Down Expand Up @@ -226,7 +226,7 @@ void cfopei_(int *lundes, int *medium, int *nwrec, int *mode, int *nbuf,
char *ftext, int *astat, int *lgtx)
#endif
{
char *pttext, *fchtak();
char *pttext;
int flags = 0;
int fildes;
int perm;
Expand Down

0 comments on commit 097792b

Please sign in to comment.