Skip to content

Commit c6b1d8e

Browse files
authored
fix improper function prototypes (empty parentheses)
1 parent c4bd4a2 commit c6b1d8e

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

driver/others/blas_l1_thread.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
int blas_level1_thread(int mode, BLASLONG m, BLASLONG n, BLASLONG k, void *alpha,
4444
void *a, BLASLONG lda,
4545
void *b, BLASLONG ldb,
46-
void *c, BLASLONG ldc, int (*function)(), int nthreads){
46+
void *c, BLASLONG ldc, int (*function)(void), int nthreads){
4747

4848
blas_queue_t queue[MAX_CPU_NUMBER];
4949
blas_arg_t args [MAX_CPU_NUMBER];
@@ -141,7 +141,7 @@ int blas_level1_thread(int mode, BLASLONG m, BLASLONG n, BLASLONG k, void *alpha
141141
int blas_level1_thread_with_return_value(int mode, BLASLONG m, BLASLONG n, BLASLONG k, void *alpha,
142142
void *a, BLASLONG lda,
143143
void *b, BLASLONG ldb,
144-
void *c, BLASLONG ldc, int (*function)(), int nthreads){
144+
void *c, BLASLONG ldc, int (*function)(void), int nthreads){
145145

146146
blas_queue_t queue[MAX_CPU_NUMBER];
147147
blas_arg_t args [MAX_CPU_NUMBER];

driver/others/blas_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9393
#endif
9494
#endif
9595

96-
extern unsigned int openblas_thread_timeout();
96+
extern unsigned int openblas_thread_timeout(void);
9797

9898
#ifdef SMP_SERVER
9999

driver/others/memory.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,7 +1999,7 @@ int goto_get_num_procs (void) {
19991999
return blas_cpu_number;
20002000
}
20012001

2002-
void openblas_fork_handler()
2002+
void openblas_fork_handler(void)
20032003
{
20042004
// This handler shuts down the OpenBLAS-managed PTHREAD pool when OpenBLAS is
20052005
// built with "make USE_OPENMP=0".
@@ -2016,9 +2016,9 @@ void openblas_fork_handler()
20162016
#endif
20172017
}
20182018

2019-
extern int openblas_num_threads_env();
2020-
extern int openblas_goto_num_threads_env();
2021-
extern int openblas_omp_num_threads_env();
2019+
extern int openblas_num_threads_env(void);
2020+
extern int openblas_goto_num_threads_env(void);
2021+
extern int openblas_omp_num_threads_env(void);
20222022

20232023
int blas_get_cpu_number(void){
20242024
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) || defined(OS_DRAGONFLY) || defined(OS_DARWIN) || defined(OS_ANDROID) || defined(OS_HAIKU)
@@ -3339,7 +3339,7 @@ static void gotoblas_memory_init(void) {
33393339
/* Initialization for all function; this function should be called before main */
33403340

33413341
static int gotoblas_initialized = 0;
3342-
extern void openblas_read_env();
3342+
extern void openblas_read_env(void);
33433343

33443344
void CONSTRUCTOR gotoblas_init(void) {
33453345

driver/others/openblas_env.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ static int openblas_env_goto_num_threads=0;
4141
static int openblas_env_omp_num_threads=0;
4242
static int openblas_env_omp_adaptive=0;
4343

44-
int openblas_verbose() { return openblas_env_verbose;}
45-
unsigned int openblas_thread_timeout() { return openblas_env_thread_timeout;}
46-
int openblas_block_factor() { return openblas_env_block_factor;}
47-
int openblas_num_threads_env() { return openblas_env_openblas_num_threads;}
48-
int openblas_goto_num_threads_env() { return openblas_env_goto_num_threads;}
49-
int openblas_omp_num_threads_env() { return openblas_env_omp_num_threads;}
50-
int openblas_omp_adaptive_env() { return openblas_env_omp_adaptive;}
51-
52-
void openblas_read_env() {
44+
int openblas_verbose(void) { return openblas_env_verbose;}
45+
unsigned int openblas_thread_timeout(void) { return openblas_env_thread_timeout;}
46+
int openblas_block_factor(void) { return openblas_env_block_factor;}
47+
int openblas_num_threads_env(void) { return openblas_env_openblas_num_threads;}
48+
int openblas_goto_num_threads_env(void) { return openblas_env_goto_num_threads;}
49+
int openblas_omp_num_threads_env(void) { return openblas_env_omp_num_threads;}
50+
int openblas_omp_adaptive_env(void) { return openblas_env_omp_adaptive;}
51+
52+
void openblas_read_env(void) {
5353
int ret=0;
5454
env_var_t p;
5555
if (readenv(p,"OPENBLAS_VERBOSE")) ret = atoi(p);

driver/others/openblas_error_handle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333

3434
#include "common.h"
3535

36-
extern int openblas_verbose();
36+
extern int openblas_verbose(void);
3737

3838
void openblas_warning(int verbose, const char * msg) {
3939
int current_verbose;

driver/others/openblas_get_config.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ static char* openblas_config_str=""
6969
;
7070

7171
#ifdef DYNAMIC_ARCH
72-
char *gotoblas_corename();
72+
char *gotoblas_corename(void);
7373
#endif
7474

7575
static char tmp_config_str[256];
76-
int openblas_get_parallel();
76+
int openblas_get_parallel(void);
7777

78-
char* CNAME() {
78+
char* CNAME(void) {
7979
char tmpstr[20];
8080
strcpy(tmp_config_str, openblas_config_str);
8181
#ifdef DYNAMIC_ARCH
@@ -90,7 +90,7 @@ char tmpstr[20];
9090
}
9191

9292

93-
char* openblas_get_corename() {
93+
char* openblas_get_corename(void) {
9494
#ifndef DYNAMIC_ARCH
9595
return CHAR_CORENAME;
9696
#else

driver/others/openblas_get_parallel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ static int parallel = 0;
4242

4343

4444
#ifdef NEEDBUNDERSCORE
45-
int CNAME() {
45+
int CNAME(void) {
4646
return parallel;
4747
}
4848

49-
int NAME() {
49+
int NAME(void) {
5050
return parallel;
5151
}
5252

5353
#else
5454
//The CNAME and NAME are the same.
55-
int NAME() {
55+
int NAME(void) {
5656
return parallel;
5757
}
5858
#endif

driver/others/parameter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <string.h>
4141
#include "common.h"
4242

43-
extern int openblas_block_factor();
43+
extern int openblas_block_factor(void);
4444
int get_L2_size(void);
4545

4646
#define DEFAULT_GEMM_P 128

0 commit comments

Comments
 (0)