[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:
Dr-Noob
2023-01-29 09:25:07 +01:00
parent b0354e28ff
commit 6eb2357485
21 changed files with 58 additions and 58 deletions

View File

@@ -141,7 +141,7 @@ void init_cpu_info(struct cpuInfo* cpu) {
// true...
// ARM32 https://elixir.bootlin.com/linux/latest/source/arch/arm/include/uapi/asm/hwcap.h
// ARM64 https://elixir.bootlin.com/linux/latest/source/arch/arm64/include/uapi/asm/hwcap.h
struct features* get_features_info() {
struct features* get_features_info(void) {
struct features* feat = emalloc(sizeof(struct features));
bool *ptr = &(feat->AES);
for(uint32_t i = 0; i < sizeof(struct features)/sizeof(bool); i++, ptr++) {
@@ -371,7 +371,7 @@ struct cpuInfo* get_cpu_info_mach(struct cpuInfo* cpu) {
}
#endif
struct cpuInfo* get_cpu_info() {
struct cpuInfo* get_cpu_info(void) {
struct cpuInfo* cpu = malloc(sizeof(struct cpuInfo));
init_cpu_info(cpu);

View File

@@ -3,7 +3,7 @@
#include "../common/cpu.h"
struct cpuInfo* get_cpu_info();
struct cpuInfo* get_cpu_info(void);
uint32_t get_nsockets(struct topology* topo);
char* get_str_topology(struct cpuInfo* cpu, struct topology* topo, bool dual_socket);

View File

@@ -702,7 +702,7 @@ struct system_on_chip* guess_soc_apple(struct system_on_chip* soc) {
}
#endif
struct system_on_chip* get_soc() {
struct system_on_chip* get_soc(void) {
struct system_on_chip* soc = emalloc(sizeof(struct system_on_chip));
soc->raw_name = NULL;
soc->soc_vendor = SOC_VENDOR_UNKNOWN;

View File

@@ -25,7 +25,7 @@ struct system_on_chip {
char* raw_name;
};
struct system_on_chip* get_soc();
struct system_on_chip* get_soc(void);
char* get_soc_name(struct system_on_chip* soc);
VENDOR get_soc_vendor(struct system_on_chip* soc);
char* get_str_process(struct system_on_chip* soc);

View File

@@ -129,15 +129,15 @@ char* get_field_from_cpuinfo(char* CPUINFO_FIELD) {
return hardware;
}
char* get_hardware_from_cpuinfo() {
char* get_hardware_from_cpuinfo(void) {
return get_field_from_cpuinfo(CPUINFO_HARDWARE_STR);
}
char* get_revision_from_cpuinfo() {
char* get_revision_from_cpuinfo(void) {
return get_field_from_cpuinfo(CPUINFO_REVISION_STR);
}
bool is_raspberry_pi() {
bool is_raspberry_pi(void) {
int filelen;
char* buf;
if((buf = read_file(_PATH_DEVICETREE_MODEL, &filelen)) == NULL) {

View File

@@ -4,11 +4,11 @@
#include "../common/udev.h"
#define UNKNOWN -1
int get_ncores_from_cpuinfo();
int get_ncores_from_cpuinfo(void);
uint32_t get_midr_from_cpuinfo(uint32_t core, bool* success);
char* get_hardware_from_cpuinfo();
char* get_revision_from_cpuinfo();
bool is_raspberry_pi();
char* get_hardware_from_cpuinfo(void);
char* get_revision_from_cpuinfo(void);
bool is_raspberry_pi(void);
#endif