mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
[v1.03] Add void to function declarations with no args. C99 Standard says in 6.7.5.3 that empty arguments are actually obsolescent - this commit fixes a warning in some compilers
This commit is contained in:
@@ -70,7 +70,7 @@ void get_name_cpuid(char* name, uint32_t reg1, uint32_t reg2, uint32_t reg3) {
|
||||
name[c++] = (reg3>>24) & MASK;
|
||||
}
|
||||
|
||||
char* get_str_cpu_name_internal() {
|
||||
char* get_str_cpu_name_internal(void) {
|
||||
uint32_t eax = 0;
|
||||
uint32_t ebx = 0;
|
||||
uint32_t ecx = 0;
|
||||
@@ -412,7 +412,7 @@ bool set_cpu_module(int m, int total_modules, int32_t* first_core) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int32_t get_core_type() {
|
||||
int32_t get_core_type(void) {
|
||||
uint32_t eax = 0x0000001A;
|
||||
uint32_t ebx = 0;
|
||||
uint32_t ecx = 0;
|
||||
@@ -430,7 +430,7 @@ int32_t get_core_type() {
|
||||
}
|
||||
}
|
||||
|
||||
struct cpuInfo* get_cpu_info() {
|
||||
struct cpuInfo* get_cpu_info(void) {
|
||||
struct cpuInfo* cpu = emalloc(sizeof(struct cpuInfo));
|
||||
cpu->peak_performance = -1;
|
||||
cpu->next_cpu = NULL;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "../common/cpu.h"
|
||||
|
||||
struct cpuInfo* get_cpu_info();
|
||||
struct cpuInfo* get_cpu_info(void);
|
||||
struct cache* get_cache_info(struct cpuInfo* cpu);
|
||||
struct frequency* get_frequency_info(struct cpuInfo* cpu);
|
||||
struct topology* get_topology_info(struct cpuInfo* cpu, struct cache* cach, int module);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdint.h>
|
||||
#include "freq.h"
|
||||
|
||||
void* compute_avx() {
|
||||
void* compute_avx(void) {
|
||||
bool end = false;
|
||||
|
||||
struct timeval begin, now;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef __FREQ_AVX__
|
||||
#define __FREQ_AVX__
|
||||
|
||||
void* compute_avx();
|
||||
void* compute_avx(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdint.h>
|
||||
#include "freq.h"
|
||||
|
||||
void* compute_avx512() {
|
||||
void* compute_avx512(void) {
|
||||
bool end = false;
|
||||
|
||||
struct timeval begin, now;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef __FREQ_AVX512__
|
||||
#define __FREQ_AVX512__
|
||||
|
||||
void* compute_avx512();
|
||||
void* compute_avx512(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdint.h>
|
||||
#include "freq.h"
|
||||
|
||||
void* compute_nov() {
|
||||
void* compute_nov(void) {
|
||||
bool end = false;
|
||||
|
||||
struct timeval begin, now;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef __FREQ_NO_VECTOR__
|
||||
#define __FREQ_NO_VECTOR__
|
||||
|
||||
void* compute_nov();
|
||||
void* compute_nov(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user