From 132b961b24f2302178276c74d7dbd120aedc851a Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Fri, 13 Aug 2021 09:40:31 +0200 Subject: [PATCH] [v0.99][PPC] Fix compilation issues in ppc --- src/common/cpu.c | 4 ++++ src/common/printer.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/cpu.c b/src/common/cpu.c index 661d10d..f075e94 100644 --- a/src/common/cpu.c +++ b/src/common/cpu.c @@ -16,6 +16,8 @@ #include "../arm/uarch.h" #endif +#define UNUSED(x) (void)(x) + #define STRING_YES "Yes" #define STRING_NO "No" #define STRING_NONE "None" @@ -38,6 +40,8 @@ char* get_str_cpu_name(struct cpuInfo* cpu, bool fcpuname) { if(!fcpuname) { return get_str_cpu_name_abbreviated(cpu); } + #elif ARCH_PPC + UNUSED(fcpuname); #endif return cpu->cpu_name; } diff --git a/src/common/printer.c b/src/common/printer.c index 30ae3e1..22b5cd9 100644 --- a/src/common/printer.c +++ b/src/common/printer.c @@ -462,7 +462,7 @@ bool print_cpufetch_x86(struct cpuInfo* cpu, STYLE s, struct color** cs, struct #endif #ifdef ARCH_PPC -bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct color** cs, struct terminal* term) { +bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct color** cs, struct terminal* term, bool fcpuname) { struct ascii* art = set_ascii(get_cpu_vendor(cpu), s); if(art == NULL) return false; @@ -471,7 +471,7 @@ bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct color** cs, struct char* manufacturing_process = get_str_process(cpu); char* sockets = get_str_sockets(cpu->topo); char* max_frequency = get_str_freq(cpu->freq); - char* cpu_name = get_str_cpu_name(cpu); + char* cpu_name = get_str_cpu_name(cpu, fcpuname); char* n_cores = get_str_topology(cpu->topo, false); char* n_cores_dual = get_str_topology(cpu->topo, true); char* altivec = get_str_altivec(cpu); @@ -737,7 +737,7 @@ bool print_cpufetch(struct cpuInfo* cpu, STYLE s, struct color** cs, bool show_f #ifdef ARCH_X86 return print_cpufetch_x86(cpu, s, cs, term, show_full_cpu_name); #elif ARCH_PPC - return print_cpufetch_ppc(cpu, s, cs, term); + return print_cpufetch_ppc(cpu, s, cs, term, show_full_cpu_name); #elif ARCH_ARM return print_cpufetch_arm(cpu, s, cs, term); #endif