Skip to content

Commit

Permalink
An empty signature in C is variadic and can take any kind/number of a…
Browse files Browse the repository at this point in the history
…rguments; apply void-signature.
  • Loading branch information
hfp committed Mar 3, 2021
1 parent 13a1425 commit d186206
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/grid/common/grid_library.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static grid_library_config config = {.backend = GRID_BACKEND_AUTO,
* \brief Initializes the grid library.
* \author Ole Schuett
******************************************************************************/
void grid_library_init() {
void grid_library_init(void) {
if (library_initialized) {
printf("Error: Grid library was already initialized.\n");
abort();
Expand All @@ -56,7 +56,7 @@ void grid_library_init() {
* \brief Finalizes the grid library.
* \author Ole Schuett
******************************************************************************/
void grid_library_finalize() {
void grid_library_finalize(void) {
if (!library_initialized) {
printf("Error: Grid library is not initialized.\n");
abort();
Expand All @@ -75,7 +75,7 @@ void grid_library_finalize() {
* \brief Returns a pointer to the thread local sphere cache.
* \author Ole Schuett
******************************************************************************/
grid_sphere_cache *grid_library_get_sphere_cache() {
grid_sphere_cache *grid_library_get_sphere_cache(void) {
return &per_thread_globals[omp_get_thread_num()]->sphere_cache;
}

Expand All @@ -97,7 +97,7 @@ void grid_library_set_config(const enum grid_backend backend,
* \brief Returns the library config.
* \author Ole Schuett
******************************************************************************/
grid_library_config grid_library_get_config() { return config; }
grid_library_config grid_library_get_config(void) { return config; }

/*******************************************************************************
* \brief Adds given increment to counter specified by lp, backend, and kernel.
Expand Down
8 changes: 4 additions & 4 deletions src/grid/common/grid_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ extern "C" {
* \brief Initializes the grid library.
* \author Ole Schuett
******************************************************************************/
void grid_library_init();
void grid_library_init(void);

/*******************************************************************************
* \brief Finalizes the grid library.
* \author Ole Schuett
******************************************************************************/
void grid_library_finalize();
void grid_library_finalize(void);

/*******************************************************************************
* \brief Configuration of the grid library.
Expand All @@ -52,7 +52,7 @@ void grid_library_set_config(const enum grid_backend backend,
* \brief Returns the library config.
* \author Ole Schuett
******************************************************************************/
grid_library_config grid_library_get_config();
grid_library_config grid_library_get_config(void);

/*******************************************************************************
* \brief Prints statistics gathered by the grid library.
Expand Down Expand Up @@ -86,7 +86,7 @@ enum grid_library_kernel {
* \brief Returns a pointer to the thread local sphere cache.
* \author Ole Schuett
******************************************************************************/
grid_sphere_cache *grid_library_get_sphere_cache();
grid_sphere_cache *grid_library_get_sphere_cache(void);

/*******************************************************************************
* \brief Adds given increment to counter specified by lp, backend, and kernel.
Expand Down
2 changes: 1 addition & 1 deletion src/grid/cpu/collocation_integration.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "tensor_local.h"
#include "utils.h"

struct collocation_integration_ *collocate_create_handle() {
struct collocation_integration_ *collocate_create_handle(void) {
struct collocation_integration_ *handle = NULL;
handle = (struct collocation_integration_ *)malloc(
sizeof(struct collocation_integration_));
Expand Down
2 changes: 1 addition & 1 deletion src/grid/cpu/collocation_integration.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ typedef struct collocation_integration_ {

} collocation_integration;

extern struct collocation_integration_ *collocate_create_handle();
extern struct collocation_integration_ *collocate_create_handle(void);
extern void collocate_synchronize(void *gaussian_handler);
extern void collocate_destroy_handle(void *gaussian_handle);
extern void calculate_collocation(void *const in);
Expand Down

0 comments on commit d186206

Please sign in to comment.