From patchwork Fri Dec 7 10:09:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: lib: fwts_virt: fix non-Intel build errors Date: Fri, 07 Dec 2012 00:09:53 -0000 From: Colin King X-Patchwork-Id: 204442 Message-Id: <1354874993-30383-1-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com From: Colin Ian King This fixes a -Wextra build error for non-Intel builds. This function is only used in x86 tests so we can just make this function return dummy values anyway since it is never called on non-x86 systems. Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Ivan Hu --- src/lib/src/fwts_virt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/src/fwts_virt.c b/src/lib/src/fwts_virt.c index ad5bec0..3c3831b 100644 --- a/src/lib/src/fwts_virt.c +++ b/src/lib/src/fwts_virt.c @@ -58,6 +58,14 @@ void fwts_exec_cpuid(const int cpu, const uint32_t cmd, cpu_registers* regs) "=c"(regs->ecx),"=d"(regs->edx) : "a"(cmd) ); +#else + /* Non x86 we just fake it */ + FWTS_UNUSED(cmd); + + regs->eax = 0; + regs->ebx = 0; + regs->ecx = 0; + regs->edx = 0; #endif if (cpu != CURRENT_CPU)