Skip to content

Commit

Permalink
Declare a function with a prototype
Browse files Browse the repository at this point in the history
From the C99 standard:
	An identifier list declares only the identifiers of the parameters of the function.
	An empty list in a function declarator that is part of a definition of that function
	specifies that the function has no parameters. The empty list in a function declarator
	that is not part of a definition of that function specifies that no information about
	the number or types of the parameters is supplied.

Because this is a function definition, not a simple delclaration, `void`
is not required. Yet, because the function has not declared beforehand,
I find it better to add `void`.
  • Loading branch information
DimitriPapadopoulos committed Sep 24, 2024
1 parent 628033a commit 6b72fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hdf5_dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void *find_sym(void *handle, const char *symbol) {
*
* Returns: -1 if an error occured, 0 for success
*/
int check_symbols() {
int check_symbols(void) {

if(DL_H5Functions.H5open == NULL)
return -1;
Expand Down

0 comments on commit 6b72fb2

Please sign in to comment.